Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1510 | Replies: 7
![]() |
•
•
Join Date: Jul 2004
Location: Sydney, Australia
Posts: 166
Reputation:
Rep Power: 5
Solved Threads: 7
Care to give a bit more information?
If I've been a help please confirm by clicking the Add to Lafinboy's Reputation link in the header of this reply.
Lafinboy Productions
:: Website Design :: Website Development ::
Lafinboy Productions
:: Website Design :: Website Development ::
The same way you include scripts in any other page. The window.open() method requires a URL as an argument. That URL will, of course, reference a page. That page will have whatever content the page author places in it, including scripts.
If you are asking about techniques for accessing parent-child DOM elements, you need to be more specific in your question.
If you are asking about techniques for accessing parent-child DOM elements, you need to be more specific in your question.
•
•
Join Date: Jul 2006
Posts: 14
Reputation:
Rep Power: 3
Solved Threads: 0
hi
I used this code to open new window
In that window itself i need script.
Is this scripting is correct or not
Please reply soon
I used this code to open new window
newwindow2=window.open(' ','popup','scrollbars=1,height=800,width=800');In that window itself i need script.
Is this scripting is correct or not
document.write('<'+'script type="text/javascript"' + 'src="jsr_class.js"><'+ '/script>');Please reply soon
Last edited by tgreer : Aug 1st, 2006 at 12:12 pm.
Thanks & Regards
Sujagr8
Sujagr8
•
•
Join Date: Jul 2006
Posts: 14
Reputation:
Rep Power: 3
Solved Threads: 0
hi
how to call a function inside script in document.write.
For example.
document.write('<'+'script type="text/javascript"' + 'src="jsr.js"><'+ '/script>');
In this jsr.js file i need to call one function how can i call using document.write method
how to call a function inside script in document.write.
For example.
document.write('<'+'script type="text/javascript"' + 'src="jsr.js"><'+ '/script>');
In this jsr.js file i need to call one function how can i call using document.write method
Last edited by tgreer : Aug 2nd, 2006 at 11:24 am.
Thanks & Regards
Sujagr8
Sujagr8
I don't know how to be more clear. Have you read and understood the answers you've already been given?
1. The
2. That being the case, you can author an entire page using
3. The code you show uses a plus sign to concatenate strings, for some reason. It isn't necessary, but as you've shown it, there would be no space between "javascript" and "src=". You need to add a space before "src".
4. The
5. If you plan on using
My questions to you would be:
1. Why are you using
2. Could you include the javascript in your main page, and have it act on your child window through DOM methods?
Also, please refrain from coloring or formatting your posts. We like to reserve formatting for code only.
1. The
document.write() method is out-of-date. However, if you're using an older DOCTYPE, it should still work for you.2. That being the case, you can author an entire page using
document.write(), so you can place HTML, scripts, event handlers, whatever you like, on that page, just as you would any other page.3. The code you show uses a plus sign to concatenate strings, for some reason. It isn't necessary, but as you've shown it, there would be no space between "javascript" and "src=". You need to add a space before "src".
4. The
document.write() method doesn't "call" anything. It writes a page. That page will need to have the code necessary to call a function... which is the same for any page.5. If you plan on using
document.write(), you'll need a corresponding document.close().My questions to you would be:
1. Why are you using
document.write()? If you know enough to write the code into your new window, chances are you know enough to simply author that page offline, and refer to it by URL in your window.open() call.2. Could you include the javascript in your main page, and have it act on your child window through DOM methods?
Also, please refrain from coloring or formatting your posts. We like to reserve formatting for code only.
•
•
Join Date: Jul 2006
Posts: 14
Reputation:
Rep Power: 3
Solved Threads: 0
•
•
•
•
Originally Posted by tgreer
I don't know how to be more clear. Have you read and understood the answers you've already been given?
1. Thedocument.write()method is out-of-date. However, if you're using an older DOCTYPE, it should still work for you.
2. That being the case, you can author an entire page usingdocument.write(), so you can place HTML, scripts, event handlers, whatever you like, on that page, just as you would any other page.
3. The code you show uses a plus sign to concatenate strings, for some reason. It isn't necessary, but as you've shown it, there would be no space between "javascript" and "src=". You need to add a space before "src".
4. Thedocument.write()method doesn't "call" anything. It writes a page. That page will need to have the code necessary to call a function... which is the same for any page.
5. If you plan on usingdocument.write(), you'll need a correspondingdocument.close().
My questions to you would be:
1. Why are you usingdocument.write()? If you know enough to write the code into your new window, chances are you know enough to simply author that page offline, and refer to it by URL in yourwindow.open()call.
2. Could you include the javascript in your main page, and have it act on your child window through DOM methods?
Also, please refrain from coloring or formatting your posts. We like to reserve formatting for code only.
Thanks & Regards
Sujagr8
Sujagr8
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)






Linear Mode