Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Regular Coder
    Join Date
    Jul 2008
    Location
    UK
    Posts
    116
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Problem with script in FF3 but not IE

    I have inherited a load of sites that its now my job to update, however the coder before me left no notes and also im not that hot with javascript.

    The problem im having is found here

    http://www.tech4t.co.uk/territorymapping/prelaunch-go/

    I you click on the "show search" you get the search box appearing, then if you enter a full valid postcode e.g "Pe1 2ux" it takes you to the redirect page then to the page you want. This works fine in IE 7 + 8 and used to work fine in older version of FF but for some1 reason it has suddenly stopped working.

    Any and all help will be much appreciated because im at my wits end.

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Its possible the variables referenced in the script aren't ever getting passed. Change this
    Code:
    <form name="searchform" onSubmit="Search('?srchname='+srchname.value+'&wholewords='+wholewords.checked+'&page=1&onpage=10');return false;">
    			<label for="text">Search for:</label><input type="text" id="txt" size="30" name="srchname" value=""></input>
    												 <input type="submit" id="btn" value="Search"></input>
    			<label for="WW">Whole Words</label>  <input type="checkbox" id="WW" name="wholewords"></input>
    												 <input type="button" onclick="closebar()" id="showhide" value="Hide"></input>
    				</form>
    to this
    Code:
    <form name="searchform" onSubmit="Search('?srchname='+this.form.srchname.value+'&wholewords='+this.form.wholewords.checked+'&page=1&onpage=10');return false;">
    			<label for="text">Search for:</label><input type="text" id="txt" size="30" name="srchname" value=""></input>
    												 <input type="submit" id="btn" value="Search"></input>
    			<label for="WW">Whole Words</label>  <input type="checkbox" id="WW" name="wholewords"></input>
    												 <input type="button" onclick="closebar()" id="showhide" value="Hide"></input>
    				</form>
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Regular Coder
    Join Date
    Jul 2008
    Location
    UK
    Posts
    116
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Tried your fix didnt do anything except stop it working in IE

  • #4
    Regular Coder
    Join Date
    Jul 2008
    Location
    UK
    Posts
    116
    Thanks
    4
    Thanked 0 Times in 0 Posts
    appreiate the help aero personally i think is something up with the the redirect function in the JS file inc.js.

    Just cant figure out why should it stop working all of a sudden in FF

  • #5
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Try this instead
    Code:
    <form name="searchform" onSubmit="Search('?srchname='+document.forms['searchform'].srchname.value+'&wholewords='+document.forms['searchform'].wholewords.checked+'&page=1&onpage=10');return false;">
    			<label for="text">Search for:</label><input type="text" id="txt" size="30" name="srchname" value=""></input>
    												 <input type="submit" id="btn" value="Search"></input>
    			<label for="WW">Whole Words</label>  <input type="checkbox" id="WW" name="wholewords"></input>
    												 <input type="button" onclick="closebar()" id="showhide" value="Hide"></input>
    				</form>
    Why they would store an entire database in a js file is beyond me. If it was done properly they would have used a real database of some kind.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #6
    Regular Coder
    Join Date
    Jul 2008
    Location
    UK
    Posts
    116
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Thats down to how the the software we use to create the search lookup creates it

  • #7
    Regular Coder
    Join Date
    Jul 2008
    Location
    UK
    Posts
    116
    Thanks
    4
    Thanked 0 Times in 0 Posts
    still no luck im afraid works in IE but not FF

  • #8
    Regular Coder
    Join Date
    Jul 2008
    Location
    UK
    Posts
    116
    Thanks
    4
    Thanked 0 Times in 0 Posts
    any more suggestions would be greatly appreciated, As far as i can tell since IE is performing ok, surely the information is being passed to the function, especially since both browser work fine if you enter in a postcode sector (PE1 2) or postcode district (pe1) with multiple territories assigned to it

  • #9
    Regular Coder
    Join Date
    Jul 2008
    Location
    UK
    Posts
    116
    Thanks
    4
    Thanked 0 Times in 0 Posts
    It also works fine in IE tab but not FF

  • #10
    Regular Coder
    Join Date
    Jul 2008
    Location
    UK
    Posts
    116
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Had a coder friend of mine look at it and hes stumped to think im just gonna have to go with alerts one at a time untill i find something

  • #11
    Regular Coder
    Join Date
    Jul 2008
    Location
    UK
    Posts
    116
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Think ive narrowed down the problem with the settimeout played around with it and got IE to do the same thing as FF

  • #12
    Regular Coder
    Join Date
    Jul 2008
    Location
    UK
    Posts
    116
    Thanks
    4
    Thanked 0 Times in 0 Posts
    manged to get in touch with the guy who wrote the script so hopefully should get a solution soon, if i do ill post here in case any1 else has the same problem

  • #13
    Regular Coder
    Join Date
    Jul 2008
    Location
    UK
    Posts
    116
    Thanks
    4
    Thanked 0 Times in 0 Posts
    Still not heard anything back from the original coder, any help peple will be greatly appreciated.

  • #14
    Regular Coder
    Join Date
    Jul 2008
    Location
    UK
    Posts
    116
    Thanks
    4
    Thanked 0 Times in 0 Posts
    original coder has no clue whats wrong so is redesigning the search functionality

  • #15
    Regular Coder
    Join Date
    Jul 2008
    Location
    UK
    Posts
    116
    Thanks
    4
    Thanked 0 Times in 0 Posts
    The coder says he is going to re-write the way the script re-directs so when he gets back to me hopefully that will be problem solved


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

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