Window location in an IFRAME

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Craig Keightley

    #1

    Window location in an IFRAME

    i have the following script :

    function subCat(){
    var d = document.all;
    var i = d.sid.value;
    if(i != "-1"){
    window.location = "subcat.php?sid ="+i;
    }
    }


    That is called on the following drop down menu:
    <select name="sid" class="dropBox" id="sid" onChange="javas cript:subCat()" >
    <option value="-1">Please Select</option>
    <option value="1">categ ory 1</option>
    <option value="2">categ ory 2</option>
    <option value="3">categ ory 3</option>
    <option value="4">categ ory 4</option>
    </select>

    It works fine in IE but not in Mozilla Firefox, what do i need to chnage to
    make it work correctly?

    Many Thanks

    Craig



  • Lee

    #2
    Re: Window location in an IFRAME

    Craig Keightley said:[color=blue]
    >
    > i have the following script :
    >
    >function subCat(){
    > var d = document.all;
    > var i = d.sid.value;
    > if(i != "-1"){
    > window.location = "subcat.php?sid ="+i;
    > }
    >}
    >
    >
    >That is called on the following drop down menu:
    ><select name="sid" class="dropBox" id="sid" onChange="javas cript:subCat()" >
    > <option value="-1">Please Select</option>
    > <option value="1">categ ory 1</option>
    > <option value="2">categ ory 2</option>
    > <option value="3">categ ory 3</option>
    > <option value="4">categ ory 4</option>
    > </select>
    >
    >It works fine in IE but not in Mozilla Firefox, what do i need to chnage to
    >make it work correctly?[/color]


    function subCat(value){
    if(value != "-1"){
    window.location = "subcat.php?sid ="+value;
    }
    }


    That is called on the following drop down menu:
    <select name="sid" class="dropBox" id="sid"
    onchange="subCa t(this.options[this.selectedIn dex].value)">
    <option value="-1">Please Select</option>
    <option value="1">categ ory 1</option>
    <option value="2">categ ory 2</option>
    <option value="3">categ ory 3</option>
    <option value="4">categ ory 4</option>
    </select>

    Comment

    • Craig Keightley

      #3
      Re: Window location in an IFRAME

      excellent, that worked as i hoped

      many thanks

      craig

      "Lee" <REM0VElbspamtr ap@cox.net> wrote in message
      news:d5sp7101c3 u@drn.newsguy.c om...[color=blue]
      > Craig Keightley said:[color=green]
      >>
      >> i have the following script :
      >>
      >>function subCat(){
      >> var d = document.all;
      >> var i = d.sid.value;
      >> if(i != "-1"){
      >> window.location = "subcat.php?sid ="+i;
      >> }
      >>}
      >>
      >>
      >>That is called on the following drop down menu:
      >><select name="sid" class="dropBox" id="sid"
      >>onChange="jav ascript:subCat( )">
      >> <option value="-1">Please Select</option>
      >> <option value="1">categ ory 1</option>
      >> <option value="2">categ ory 2</option>
      >> <option value="3">categ ory 3</option>
      >> <option value="4">categ ory 4</option>
      >> </select>
      >>
      >>It works fine in IE but not in Mozilla Firefox, what do i need to chnage
      >>to
      >>make it work correctly?[/color]
      >
      >
      > function subCat(value){
      > if(value != "-1"){
      > window.location = "subcat.php?sid ="+value;
      > }
      > }
      >
      >
      > That is called on the following drop down menu:
      > <select name="sid" class="dropBox" id="sid"
      > onchange="subCa t(this.options[this.selectedIn dex].value)">
      > <option value="-1">Please Select</option>
      > <option value="1">categ ory 1</option>
      > <option value="2">categ ory 2</option>
      > <option value="3">categ ory 3</option>
      > <option value="4">categ ory 4</option>
      > </select>
      >[/color]


      Comment

      Working...