Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

NEED Help w/functions(NEW TO VBSCRIPT)

Status
Not open for further replies.

tbarnes2788

Programmer
Feb 26, 2004
7
US
I am writing a code that will allow user to input data to create a personal web page. New page will display and Layout data that was input. Here is my code:
Please help me solve my problem



<html><head><title>Growlite Marketing</title>
</head>
<body bgcolor="#0000A0" text="#660033">
<font color=#FFFFFF><center><h1>Growlite Marketing</h1>
</center></font>

<h2 align="center"><img src="turtle.gif" width="200" height="107" alt="" border="0" align="middle"></h2>
<div align="center">
<center>
<font color="#FFFFFF"><center><h2>Member Registration</h2>
</center></font>
<!-- Start of FORM -->
<form name="formVB" method="post" action="javascript:void(0);">
<table border="0" width="39%" align="center">
<tr>
<td width="100%"><font color="#FFFFFF"><b>User Name</b><td>
<td width="50%">
<input type="text" name="txtUname" size="30" value="">
</tr><tr>
<td width="100%"><font color="#FFFFFF"><b>Page Color</b><td>
<td width="50%">
<input type="text" name="txtbgcolor" size="30" value="">
</tr><tr><br>
<td width="100%"><font color="#FFFFFF"><b>Text Color</b><td>
<td width="50%">
<input type="text" name="txtTcolor" size="30" value="">
</tr><tr><br>
<td width="150%"><font color="#FFFFFF"><b>Favorite Logo</b><td>
<td width="50%">
</tr>
<td>
<select size="1" name="Flogo">
<option value="zebra">Zebra</option>
<option value="turtle">Turtle</option>
<option value="swan">Swan</option>
<option value="ladybug">Lady Bug</option>
</select></font><p>
</table>
<input type="button" value="Submit" name="btnSubmit" onClick="displayVB(bgcolorVB, tcolorVB, flogoVB)"></p>
</form>

<script language="vbscript">
function displayVB()
dim uname, bgcolor, tcolor, flogo
uname = document.formVB.txtUname.value
bgcolor = getbgcolorVB()
tcolor = gettcolorVB()
flogo = getflogoVB()
end function
function bgcolorVB()
color = yellow, blue;
getbgcolor = color
end function
function tcolorVB()
txtcolor = white, blue
gettcolor = txtcolor
end function
function flogoVB()
logo = turtle, ladybug, zebra, swan
getflogo = logo
end function
</script>
</body>
</html>
 
What is your specific problem? From looking at your code, I can tell you that none of your functions will actually return any values. I didn't go to deep into looking at the code though because you didn't state what the script is doing that it shouldn't. Or, isn't doing that it should.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top