Jump to content


simple php doubt

  • Please log in to reply
2 replies to this topic

#1 ramu_rp2005

  • Members
  • PipPip
  • Member
  • 13 posts

Posted 15 March 2006 - 05:12 AM

I've a code like this below:

<BODY background=images/ltgray_lines1.gif text=000000> <br><br><br><br><br><font size=2 face="Garamond">

<FORM method=GET name="searchform"><center>
<td><select name="pattern" >
<option value="streamtype">Type</option>
<option value="streamname">Name</option>
<option value="videopid"> Vid Pid</option>
<option value="audiopid">Aud Pid</option>
<option value="pcrpid">Pid</option>
<option value="clockrate">Clock Rate</option>
<option value="videotype">ideo type</option>
<option value="ac3bitrate">A3 Bit</option>
<option value="ac3mod">A3 Mod</option>
<option value="samplerate">Sam Rate</option>
<option value="resolution">Res</option>
<option value="profile">Prof</option>
<input type="button" value="Search" onclick=selectstr()>
</FORM> </font>

Now my doubt is how can i take the value of the combo and submit it to another form.My friend gave the cod e below. but can anyone explain what does it mean.the code is below:
wht does "str=str=" mean.

function selectstr()

str=str = frm.pattern.options[frm.pattern.selectedIndex].value

#2 shortj75

  • Members
  • PipPipPip
  • Advanced Member
  • 118 posts
  • LocationPort Huron,mi

Posted 15 March 2006 - 07:53 AM

str generaly means string you friend probably mistyped it he probably meant to type str=the rest of your code
because str=str=the rest of your code will cause a parser error
it would actually caus an error in any scripting language
The Short One

hopfully this helps if it doesn't sorry
i won't write the code for you!!! you don't learn that way

#3 keeB

  • Staff Alumni
  • Advanced Member
  • 1,078 posts
  • LocationCalifornia

Posted 15 March 2006 - 08:29 AM

This is also a JScript Question..

Remove the first str= and you should be fine.. it looks ok

Come visit my site to see my latest projects

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users