|
-
Nov 25th, 2002, 07:09 AM
#1
Thread Starter
Retired VBF Adm1nistrator
Using javascript to write a script tag ?
I'm trying to write a <script> tag with a script inside it, from another script.
But I can't seem to get it to work.
This is what I have at the moment
Code:
function redirectFrame() {
parent.main.write('<script language="JavaScript">');
parent.main.write('document.write('alert("testing")');
parent.main.write('</script>');
}
Basically, the reason for all this is that our other branch has a website, and im going to ask them to link to a particular page.
Now that page itself is a frameset, and once the page has loaded a piece of JS makes the bottom page navigate to another page.
The problem with that approach was that the piece of javascript, which I have in the frameset page itself, was executing each time the user has browesed to a new page, and then it would make them go back to a different page.
So I was thinking I would have to put a piece of JS into the created page myself.
... so um yeah.
I think I've probably confused anyone reading ?
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|