943,653 Members | Top Members by Rank

Ad:
You are currently viewing page 1 of this multi-page discussion thread
Jun 13th, 2004
0

Help with .js JAVASCRIPT file!!!!!?!!?!?

Expand Post »
Hi all,

My page utilizes a few javascript files for my navigation bar and also a few other palces... My problems is this - I want to call to a page within the site as in the script below, but I wish it to be a separate WINDOW al-together. If I do what I have written now and the person hit;s the close button on the page I call to it closes the whole window - thus leaving my web page....

HELP!!!!

here's the script I need altered to have it open up a window on it's own.

document.write('</td></tr><tr></form><form><td>');
document.write('<input value="View Titles Slideshow" onClick="parent.location=\'slideshow.htm\'" onmouseover="this.className=\'buttonon\'" onmouseout="this.className=\'button\'" class="button" type="button"><br>');

THANKS SO MUCH!! :lol:
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Johnrandazzo is offline Offline
3 posts
since Jun 2004
Jun 13th, 2004
0

Re: Help with .js JAVASCRIPT file!!!!!?!!?!?

Are you just trying to open up a new window when something is pressed? Why not try the TARGET="_BLANK" method (insert this in your "A HREF" tag)?

Or the following method:

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1.  
  2. <script language="javascript">
  3. <!--
  4.  
  5. function popupNewWindow(page) {
  6. window.open(page, "AddTask", "width=570,height=560,location=no,scrollbars=yes,menubars=yes");
  7. }
  8.  
  9. -->
  10. </script>
  11.  
  12. <a href="javascript:popupNewWindow('somepage.htm')">Click insert new</a>

Not sure if this is what you want.
Last edited by samaru; Jun 13th, 2004 at 11:26 pm.
Team Colleague
Reputation Points: 262
Solved Threads: 18
a.k.a inscissor
samaru is offline Offline
1,227 posts
since Feb 2002
Jun 13th, 2004
0

Re: Help with .js JAVASCRIPT file!!!!!?!!?!?

I think Dan means target="_blank" and not alt=
Administrator
Staff Writer
Reputation Points: 1422
Solved Threads: 162
The Queen of DaniWeb
cscgal is offline Offline
13,645 posts
since Feb 2002
Jun 13th, 2004
0

Re: Help with .js JAVASCRIPT file!!!!!?!!?!?

Yes! Sorry for the f-up. Also, Dani, is there something you can do about the horrible parsing job the code tags do? It's putting unnecessary spacing between code. Look at the code I posted before, where it says "NewWindow" - there's a spacing there.
Team Colleague
Reputation Points: 262
Solved Threads: 18
a.k.a inscissor
samaru is offline Offline
1,227 posts
since Feb 2002
Jan 23rd, 2005
0

Re: Help with .js JAVASCRIPT file!!!!!?!!?!?

Ok, I dont wont to open another thread I'll ask here.
I have some stupid problem with reference to window.location!!! :-|

If 2 files bla.htm & bla.js(linked to first one ofcourse).

I wont to write a function witch loads another site when u press the onsubmit button. Im using window.location="mail.htm" in bla.js file but no results!!
So I have to make some kind of reference, but I dont know how, please help!
Reputation Points: 10
Solved Threads: 0
Light Poster
pajac is offline Offline
33 posts
since Jan 2005
Jan 23rd, 2005
0

Re: Help with .js JAVASCRIPT file!!!!!?!!?!?

top.window.location="mail.html";

no?
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Jan 23rd, 2005
0

Re: Help with .js JAVASCRIPT file!!!!!?!!?!?

Quote originally posted by Comatose ...
top.window.location="mail.html";

no?
Not working.
In bla.htm I have this submit button in form with user name & password I if they have the write one they are redirected to other site.If u know what I meen?
But I cant make a redirection in bla.js file. If I put the script in bla.htm file it works, but I dont wont to to this.
Reputation Points: 10
Solved Threads: 0
Light Poster
pajac is offline Offline
33 posts
since Jan 2005
Jan 23rd, 2005
0

Re: Help with .js JAVASCRIPT file!!!!!?!!?!?

Does other javascript code work in the external file, within the page. (for example, have you tried making a function in the .js file, with nothing more than say, an alert with a message of test, and tried calling it with the page, just to see if the page is importing the external file?)
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Jan 23rd, 2005
0

Re: Help with .js JAVASCRIPT file!!!!!?!!?!?

Jes it's working just fine. :rolleyes:
Reputation Points: 10
Solved Threads: 0
Light Poster
pajac is offline Offline
33 posts
since Jan 2005
Jan 23rd, 2005
0

Re: Help with .js JAVASCRIPT file!!!!!?!!?!?

Sometimes God's Power is all it takes
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: TXT Plays like a Music File?
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: Begining Java...





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC