User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 402,828 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,042 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

is it possible to over write internal java script?

Join Date: Aug 2006
Location: Noida, India
Posts: 157
Reputation: Luckychap is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 16
Luckychap's Avatar
Luckychap Luckychap is offline Offline
Junior Poster

Re: is it possible to over write internal java script?

  #5  
Apr 30th, 2008
Hi tiger86, if u can explain ur problem little bit more, i want to know what exactly u want to do.

var is not a command but a way to declare a variable in javascript.

I am explaining my prev. post again, if u still did not get ur problem solved, explain ur problem in detail.

first i want to tell u what i understand from ur post: You want to overwrite the javacript at run-time. if this is correct then my post will help u otherwise explain me ur problem. here is want i explained in prev post. for example u have a page:

  1. <html>
  2. <head></head>
  3.  
  4. <body>
  5. <script>
  6. function myfunct() {
  7. //do something
  8. }
  9. </script>
  10.  
  11. </body>
  12. </html>


if u want to change js code in above page,
this a js code todo that :

var tags = document.getElementsByTagName("script");

//Now changing the js code
tags[0].innerHTML = "your new js code should be written here as a string";

again i had not tested it. please let me know how it works?
Last edited by peter_budo : Apr 30th, 2008 at 7:51 am. Reason: Keep It Organized - plase use [code] tags
Reply With Quote  
All times are GMT -4. The time now is 11:47 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC