Click here to Skip to main content
15,879,239 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: how to add subtotal in javascript? Pin
jedongkendrick27-Jan-10 1:09
jedongkendrick27-Jan-10 1:09 
AnswerRe: how to add subtotal in javascript? Pin
Graham Breach27-Jan-10 4:05
Graham Breach27-Jan-10 4:05 
GeneralRe: how to add subtotal in javascript? Pin
jedongkendrick27-Jan-10 4:31
jedongkendrick27-Jan-10 4:31 
GeneralRe: how to add subtotal in javascript? Pin
Graham Breach27-Jan-10 8:04
Graham Breach27-Jan-10 8:04 
GeneralRe: how to add subtotal in javascript? Pin
jedongkendrick27-Jan-10 19:51
jedongkendrick27-Jan-10 19:51 
GeneralRe: how to add subtotal in javascript? Pin
jedongkendrick27-Jan-10 22:51
jedongkendrick27-Jan-10 22:51 
AnswerRe: how to add subtotal in javascript? Pin
Graham Breach27-Jan-10 23:09
Graham Breach27-Jan-10 23:09 
Questionjavascript converturl () - help with this function [modified] Pin
treeeen26-Jan-10 9:32
treeeen26-Jan-10 9:32 
I'm hoping someone can help.   I'm very new to javascipt and am attempting to create a form that has hidden values to pass to Bing Search.   I'm also trying to add a drop down menu that causes the value from the option the user changes to be passed along in the same url.

In short, if the user adds "java" in the text box and chooses "dallas" from the drop down menu it will incorporate these variables into the url along with the hidden words that are static, being "resume NOT jobs NOT apply".   The url would end up looking something like: http://www.bing.com/search?&q=Resume+-jobs+-apply+java+"Dallas"

This is the code I have currently, that just fails

<script>
                  function converturl() {
                                       document.go.url.value = document.go.url.value.replace(/\s/g, "");
                                       var url = document.getElementsByName("url")[0];
var city = document.getElementsByName("city")[0];
                                       var fullurl = document.getElementsByName("fullurl")[0];
                                       fullurl.value = "http://www.bing.com/search?&q=Resume+-jobs+-apply+-submit+-required+-wanted+-template+-wizard+-free+-write+-sample+" + url.value.city

                  }

</script>


<form name= "go" onsubmit='converturl();location.href=fullurl.value.city;return false'>
<input name='url' type='text' /> <input name='fullurl' type='hidden' />
<select name="city"
OnSubmit='converturl();location.href=fullurl.value.city;return false'>
     
                  <option value="Dallas">Dallas
                  <option value="Chicago">Chicago
                  <option value="New York">New York
</select><input type='submit' value=" Go " />
</form>

<b>This script seems to work, but doesn't pass the city variable (url2) to bing.</b>

<script>
function converturl() {
document.go.url.value = document.go.url.value.replace(/\s/g, "");
var url = document.getElementsByName("url")[0];
var url2 = document.getElementsByName("url2")[0];
var fullurl = document.getElementsByName("fullurl")[0];
fullurl.value = "http://www.bing.com/search?&q=Resume+-jobs+-apply" + url.value

}

</script>


<form name= "go" önsubmit='converturl();location.href=fullurl.value;return false'>
<input name='url' type='text' /> <input name='fullurl' type='hidden' />
<input type='submit' value=" Go " />
</form>
<select name="city"
önSelect="location.href=url2.city.options[selectedIndex].value">
<option selected>Please Select...
<option value="Dallas">Dallas
<option value="Chicago">Chicago
<option value="New York">New York
</select>

modified on Tuesday, January 26, 2010 3:39 PM

AnswerRe: javascript converturl () - help with this function Pin
daveyerwin27-Jan-10 5:46
daveyerwin27-Jan-10 5:46 
GeneralRe: javascript converturl () - help with this function Pin
treeeen29-Jan-10 9:04
treeeen29-Jan-10 9:04 
GeneralRe: javascript converturl () - help with this function Pin
daveyerwin30-Jan-10 3:40
daveyerwin30-Jan-10 3:40 
QuestionHow to read client serial port from WebApplication Pin
Member 439056925-Jan-10 5:50
Member 439056925-Jan-10 5:50 
AnswerRe: How to read client serial port from WebApplication Pin
satwika.g17-Feb-10 10:47
satwika.g17-Feb-10 10:47 
AnswerRe: How to read client serial port from WebApplication Pin
mano_meee3-Oct-10 0:29
mano_meee3-Oct-10 0:29 
Questionretrieve scanned document Pin
Yosh_25-Jan-10 1:04
professionalYosh_25-Jan-10 1:04 
AnswerRe: retrieve scanned document Pin
David Mujica25-Jan-10 2:57
David Mujica25-Jan-10 2:57 
AnswerRe: retrieve scanned document Pin
JHizzle25-Jan-10 4:08
JHizzle25-Jan-10 4:08 
QuestionVisual Studio Web Developer 2008 Pin
Roy Shoa24-Jan-10 1:12
Roy Shoa24-Jan-10 1:12 
QuestionConvertor Pin
mehrdadc4823-Jan-10 3:38
mehrdadc4823-Jan-10 3:38 
Questionlisten/watch video in asp Pin
rajiv_kadam23-Jan-10 1:42
rajiv_kadam23-Jan-10 1:42 
AnswerRe: listen/watch video in asp Pin
flyinpc24-Feb-10 19:42
flyinpc24-Feb-10 19:42 
QuestionIs there anybody could tell me how to read data from client serial port by HTML Pin
WebMaster22-Jan-10 18:51
WebMaster22-Jan-10 18:51 
QuestionJavascript,calling child window function from opener doesn't work Pin
keniagm22-Jan-10 3:20
keniagm22-Jan-10 3:20 
AnswerRe: Javascript,calling child window function from opener doesn't work [modified] Pin
daveyerwin22-Jan-10 4:27
daveyerwin22-Jan-10 4:27 
GeneralRe: Javascript,calling child window function from opener doesn't work Pin
keniagm22-Jan-10 7:29
keniagm22-Jan-10 7:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.