|
-
Feb 4th, 2004, 09:15 PM
#1
Thread Starter
Lively Member
IE and Javascript issue with onclick event *** [RESOLVED] ***
I have a web site that has an inline frame and in this inline frame are three dynamic links. Each dynamic link fires a new windows containing the link. The problem is the that after the link is clicked and the page is displayed IE jams the original page off teh browser window and you can only see the bottom portion. Is there any way to stop this behavior.
It does not happen in NS.
Last edited by scimini; Feb 20th, 2004 at 12:02 PM.
-
Feb 5th, 2004, 10:33 AM
#2
Frenzied Member
Re: IE and Javascript issue with onclick event
Originally posted by scimini
I have a web site that has an inline frame and in this inline frame are three dynamic links. Each dynamic link fires a new windows containing the link. The problem is the that after the link is clicked and the page is displayed IE jams the original page off teh browser window and you can only see the bottom portion. Is there any way to stop this behavior.
It does not happen in NS.
Does it jam what's inside the Iframe ? And how does your 'dynamic link' code look ?
"Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
- Zack de la Rocha
Hear me roar.
-
Feb 5th, 2004, 07:31 PM
#3
Thread Starter
Lively Member
Code:
document.write("<a href=# onClick=response=false;window.open('LinksPage.html?ID=" + eval(Links) + "','linkwindow','width=800,height=588,scrollbars=no')><img border=0 src=images/Links/" + Links + "_Off.jpg onmouseover=document.images[1].src='images/Links/" + Links + "_On.jpg' onmouseout=document.images[1].src='images/Links/" + Links + "_Off.jpg' alt='" + Description[Links] + "'></a>")
The Iframe contains a page that acts like scroller scrolling through links, when you click on the link it opens a new window display the link.
Not just the iframe jams off the browser but the entire page. It appears to jump up to the iframe that the link scroller was displayed in.
-
Feb 6th, 2004, 08:18 AM
#4
Frenzied Member
hmm weird...
- What does the response=false do ?
"Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
- Zack de la Rocha
Hear me roar.
-
Feb 6th, 2004, 10:17 AM
#5
Thread Starter
Lively Member
I thought it was suppose to ignore the click event and just process the onclick.
I tried it in Netscape and it worked properly.
-
Feb 6th, 2004, 10:35 AM
#6
Hyperactive Member
can you provide a link to that page?
i am unsure what you mean
to cancel links you would do this
Code:
<a href="http://www.vbforums.com" onClick="javascript:window.open('','win','width=200,height=200');return false;">open</a>
see what happens when you take the stuff in bold out
bsw
-
Feb 6th, 2004, 07:46 PM
#7
Thread Starter
Lively Member
The page is in development and not on the web.
I removed the bold text part and the still jumped but the link did not open.
-
Feb 8th, 2004, 11:42 AM
#8
Thread Starter
Lively Member
I have a little more information.
The page jumps up to the iframe that the click event was registered. In short the Iframe nows becomes topmargin=0 instead of default.html
-
Feb 9th, 2004, 03:09 PM
#9
Hyperactive Member
can you create a dummy page of this?
i have a hard time understand your problem
the code i showed you (the return false) was to demonstrate how you can canel an action, in this case it was the href..
cheers
bsw
-
Feb 12th, 2004, 03:32 PM
#10
Thread Starter
Lively Member
I did use the Return False on another page and it solved the problem but for some reason it does not work on this particular page. I will create a dummy page.
-
Feb 20th, 2004, 12:02 PM
#11
Thread Starter
Lively Member
Becuase the on click event was not in double quotes the return false did not fire.
Placing the entire thing in double quotes solved the problem.
-
Feb 21st, 2004, 09:09 AM
#12
For your information, you may only omit the quotes if your value is either all digits or all letters. Any punctuation or a mix of digits and letters and you HAVE to use quotes. In general, it's good style to always use quotes.
IE is just the best browser at interpreting incorrect HTML.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Feb 25th, 2004, 10:50 AM
#13
Thread Starter
Lively Member
It is kind of hard to enclose in double quotes when you are building the <input> tag with document.write
-
Feb 25th, 2004, 11:29 AM
#14
It's unreadable, but by no means hard. Just use the backslash correctly
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Feb 25th, 2004, 03:54 PM
#15
Thread Starter
Lively Member
I did, it was a mess. Fianlly just moved to ASP for it.
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
|