Jump to content

rochakchauhan

Members
  • Posts

    18
  • Joined

  • Last visited

    Never

About rochakchauhan

  • Birthday 10/05/1978

Contact Methods

  • Website URL
    http://www.rochakchauhan.com

Profile Information

  • Gender
    Male
  • Location
    Chandigarh

rochakchauhan's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Well one way (not an optimized one though) to find out the bandwidth used is: Step 1) Write all the content / sting you read to a file on the server. Step 2) Then use filesize () to get the bandwidth used..
  2. Well I guess the issue is with the FTP user. If you have root/super user access, change the owner of the directories to the FTP USER. chmod FTP_USER.FTP_USER Dir_Name /R
  3. NO NO NO... This is not how you do it Its simple... Here how you write content from php in an xml file <?php // write code / logic to get content $content="some content here"; $xml = '<?xml version="1.0" encoding="UTF-8" ?> <cmrl xmlns:dotgo="http://dotgo.com/cmrl/1.0"> <match pattern="*"> <message> <content>Reply with your user name</content> <input name="name"> <message> <content>'.$content.'</content> </message> </input> </message> </match> </cmrl>'; // now this is how to display all this page as an XML file: header("Content-type: text/xml"); echo $xml; ?>
  4. No you can call function inside another function... the reason is because you are calling setEvent() before your HTML page is rendered. Solutions: Either call setEvent (); inside onLoad or call it on some event like onclick.. it will work To know more... check out: http://rochakchauhan.com/blog/2008/09/25/most-common-javascript-mistakes/
  5. I think to make it floating... use: // CSS position: fixed; and to make the content fit in.. use: // CSS overflow:auto;
  6. Well I dont think you can do that with Javascript alone... many issues... portability, compatibility, security .. try this: function copyToClipboardViaFlash(text) { var flashId = 'flashId-HKxmj5'; var clipboardSWF = 'http://appengine.bravo9.com/copy-into-clipboard/clipboard.swf'; if (!document.getElementById(flashId)) { var div = document.createElement('div'); div.id = flashId; document.body.appendChild(div); } document.getElementById(flashId).innerHTML = ''; var content = '<embed src="' + clipboardSWF + '" FlashVars="clipboard=' + encodeURIComponent(text) + '" width="0" height="0" type="application/x-shockwave-flash"></embed>'; document.getElementById(flashId).innerHTML = content; }
  7. NOGO.. it wont work... to set value from PHP to javascript you need to write like this... <?php $phpVar1="Value1"; $phpVar2="Value2"; echo "<script type='text/javascript'>"; echo "var jsVar1='$phpVar1';"; echo "var jsVar2='$phpVar2';"; echo "function someFunction() { alert(jsVar1); }"; echo "</script>"; ?> This above code will give this output: <script type='text/javascript'> var jsVar1='Value1'; var jsVar2='Value2'; function someFunction(){ alert(jsVar1); } </script>
  8. I dont think you can do that now.... When I say now... i mean on new browsers, it is not allowed as it is security breach. So in simple work you can access object, content or ever the complete HTML code inside an iframe BUT only in older version. So my advice, look for alternative solution. May be AJAX....
  9. I think you are looking for  strip_tags() ... it inbuilt in PHP :)
  10. I believe you are saving the above file and .php.  If thats the case you need to write the code this this: [code]<?='<?xml version = "1.0" encoding = "utf-8"?>';?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns = "http://www.w3.org/1999/xhtml">   <head> <title> Apple Information </title>   </head>   <body>     <p>       Apple is the common name for any tree of the genus Malus, of       the family Rosaceae. Apple trees grow in any of the temperate       areas of the world. Some apple blossoms are white, but most       have stripes or tints of rose. Some apple blossoms are bright       red. Apples have a firm and fleshy structure that grows from       the blossom. The colors of apples range from green to very       dark red. The wood of apple trees is fine-grained and hard.       It is, therefore, good for furniture construction. Apple trees       have been grown for many centuries. They are propagated by       grafting because they do not reproduce themselves.     </p>   </body> </html>[/code]
  11. To get country from IP address for FREE... try API from http://geoip.dmwtechnologies.com
  12. function change(){ document.getElementById('idOfTheElemeny').style.backgroundColor="#FF00000": } onmouseover="change();"
  13. Here are few more reference Simple Ajax: http://www.phpclasses.org/browse/package/2718.html Ajax: http://rochakchauhan.com/blog/category/programming/ajax/
  14. Here are few reference. If you still have any issue feel free to contact me. Simple Ajax: http://www.phpclasses.org/browse/package/2718.html Ajax: http://rochakchauhan.com/blog/category/programming/ajax/
  15. I am not sure if you can do that for an iframe. Having said that, you can try this workaround. instead of manipulating the iframe, change the properties of its container. EG: Put the iframe is a div and then set "display" of that div to "none" this will hide it.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.