Hi All, I have a little deal where I need to run some javascript code when someone clicks on a link. The link shouldn't go anywhere.. let me explain. The link is on a person's name, and when they click on their name, I want to pop up a little window that gives them all of the information about themselves. I have the javascript already written, and the PHP code written to get the data from the database... it's the link part that is tripping me up now. I have this: <a href='' OnClick=MyInfo()>[person's name]</a> and it's working -- the window pops up and everything looks great... but the page that the link is on does different things in different browsers: IE5.x/Netscape 4.x/Mozilla 0.9: Tries to access the directory that the URL is in, subsequently getting a "directory browsing is denied" error. Konqueror: Works fine, but the link isn't underlined like a link is supposed to be. What can I do? Has anyone tried to do something like this before? Thanks for putting up with the off topic thread :-/ -Steven
On Friday 01 June 2001 01:39, Steven Hatfield wrote:
Hi All, I have a little deal where I need to run some javascript code when someone clicks on a link. The link shouldn't go anywhere.. let me explain.
The link is on a person's name, and when they click on their name, I want to pop up a little window that gives them all of the information about themselves. I have the javascript already written, and the PHP code written to get the data from the database... it's the link part that is tripping me up now.
I have this: <a href='' OnClick=MyInfo()>[person's name]</a>
Try '<a href='#' OnClick=MyInfo()>[person's name]</a>' instead, IE will not go into the directory listing, it just refers to a blank internal link, contrarly from '' which is a link to the current working directory :) Ciao! Ju.
and it's working -- the window pops up and everything looks great... but the page that the link is on does different things in different browsers: IE5.x/Netscape 4.x/Mozilla 0.9: Tries to access the directory that the URL is in, subsequently getting a "directory browsing is denied" error. Konqueror: Works fine, but the link isn't underlined like a link is supposed to be.
What can I do? Has anyone tried to do something like this before?
Thanks for putting up with the off topic thread :-/
-Steven
On Thursday 31 May 2001 07:46 pm, Julien Biezemans wrote:
On Friday 01 June 2001 01:39, Steven Hatfield wrote:
Hi All, I have a little deal where I need to run some javascript code when someone clicks on a link. The link shouldn't go anywhere.. let me explain.
The link is on a person's name, and when they click on their name, I want to pop up a little window that gives them all of the information about themselves. I have the javascript already written, and the PHP code written to get the data from the database... it's the link part that is tripping me up now.
I have this: <a href='' OnClick=MyInfo()>[person's name]</a>
Try '<a href='#' OnClick=MyInfo()>[person's name]</a>' instead, IE will not go into the directory listing, it just refers to a blank internal link, contrarly from '' which is a link to the current working directory :)
Ciao!
Ju.
and it's working -- the window pops up and everything looks great... but the page that the link is on does different things in different browsers: IE5.x/Netscape 4.x/Mozilla 0.9: Tries to access the directory that the URL is in, subsequently getting a "directory browsing is denied" error. Konqueror: Works fine, but the link isn't underlined like a link is supposed to be.
What can I do? Has anyone tried to do something like this before?
Thanks for putting up with the off topic thread :-/
-Steven
Thank you, that seems to have done the trick :-) -Steven
Hi Sorry for the late reply, but you may find this way better: <A HREF="/path/to/that/popup.html" TARGET="POPUP">ClickMe!</A> This doesn't use Javascript, so is much more compatible with a wider variety of browsers or if Javascript has been disabled for security purposes. The TARGET variable tells the browser what window/frame to open the page in. In this case, the frame 'popup' doesn't exist, so a new browser window is opened. If you need to set the size/position of the popup, then you'll have to use Javascript, although you could put it in the popup window itself and use the above method to call the window. I hope this helps, Andrew -----Original Message----- From: Steven Hatfield [mailto:ashari@knightswood.net] Sent: 01 June 2001 00:39 To: SuSE Mailing List Subject: [SLE] Seriously OT: Need help with HTML Hi All, I have a little deal where I need to run some javascript code when someone clicks on a link. The link shouldn't go anywhere.. let me explain. The link is on a person's name, and when they click on their name, I want to pop up a little window that gives them all of the information about themselves. I have the javascript already written, and the PHP code written to get the data from the database... it's the link part that is tripping me up now. I have this: <a href='' OnClick=MyInfo()>[person's name]</a> and it's working -- the window pops up and everything looks great... but the page that the link is on does different things in different browsers: IE5.x/Netscape 4.x/Mozilla 0.9: Tries to access the directory that the URL is in, subsequently getting a "directory browsing is denied" error. Konqueror: Works fine, but the link isn't underlined like a link is supposed to be. What can I do? Has anyone tried to do something like this before? Thanks for putting up with the off topic thread :-/ -Steven -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq and the archives at http://lists.suse.com
participants (3)
-
Andrew Smith
-
Julien Biezemans
-
Steven Hatfield