SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru mdumka's Avatar
    Join Date
    Jul 2003
    Location
    True North
    Posts
    642
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript Firefox Problem

    Hi There ...

    I am using a custom JS dropdown in place of an HTML select ... the problem is the drop is used to select a link then a button is clicked to goto the selected item.

    In IE it work perfect ... but in FF the values just get appended to the URL in address bar ... it is just a window.open function but will not work.

    here is my functions ...

    Code:
    function setFields(form,display,hyperlink){
    		form.display.value = display;
    		form.hyperlink.value = hyperlink;
    	}
    	function gotoLink(form,target) {
    		var link_value = form.hyperlink.value;
    		if (link_value == '') {
    			alert('Please make a selection.');
    		} else {
    			window.open(link_value,'_self');
    		}
    	}
    I have also attached the page so you can see the full thing.

    Thanks for all of the help.

    Mike
    Attached Files Attached Files

  2. #2
    SitePoint Enthusiast
    Join Date
    Nov 2005
    Location
    London, UK
    Posts
    81
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you not try to pin down what the problem is instead of uploading a whole zip that no one can be bothered to download and spend time on?

  3. #3
    SitePoint Guru mdumka's Avatar
    Join Date
    Jul 2003
    Location
    True North
    Posts
    642
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi peter ...

    I had no idea what the problem was ... that is why I uploaded the entire zip file so the error can be seen in FireFox, it was just very hard to explain and seeing is always better and it was only 1 HTML file.

    Any who ... the problem was using a <button> with onClick was attaching the form fields to the URL in firefox and causing the window not to open. I changed it to a <input type=button> with on click and it worked. I have no idea what is the difference between the 2 and what this would happen.

    Thanks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •