.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> JavaScript/VBScript >> Post New QuestionBookmark and Share Subscribe to Forum

Unable to Produce the Output

Posted By: pasaway cool     Posted Date: September 27, 2011    Points:5   Category :JavaScript/VBScript
Please help me I'm having hard time incorporating the button on the previous workings script.I just don't want to click the H or RB link but I also want to add or incorporate the form with input and button part but still able to have same output when I click the butto..Thanks.

<html>
<head>
<SCRIPT LANGUAGE="JavaScript">

<!--

function display (Name, Number, Weight, Melt, Freeze) {
document.table.name.value=Name;
document.table.number.value=Number;
document.table.weight.value=Weight;
document.table.melt.value=Melt;
document.table.freeze.value=Freeze;
}

// -->

</script>
</head>

<BODY>

<!-- THIS FORM IS WORKING // -->
<form>

<table cellspacing=2 cellpadding=0 width=500>

<tr>

<td align=center bgcolor="#FFE4C4"><a

href="javascript:display('Hydrogen','1','1.0079','-259.14C','-252.87C');">

H</a></td>

<td colspan="16"></td>

<td align=center bgcolor="#5F9EA0"><a

href="javascript:display('Rubidium','37','85.467','38.89 C','688 C');">Rb</a></td>
</tr>

</table>

</form>

<form name="table">

<table width="500">

<tr>

<td align="center" width="33%">Name</td>

<td align="center" width="33%">Number</td>

<td align="center" width="33%">Weight</td>

</tr>

<tr>

<td align="center" width="33%"><input type="text" name="name" value=" " size="14"></td>

<td align="center" width="33%"><input type="text" name="number" value=" " size="6"></td>

<td align="center" width="33%"><input type="text" name="weight" value=" " size="16"></td>

</tr>

<tr>

<td align="center" width="33%">Melts</td>

<td align="center" width="33%"></td>

<td align="center" width="33%">Boils</td>

</tr>

<tr>

<td align="center" width="33%"><input type="text" name="melt" value=" " size="18"></td>

<td align="center" width="33%"></td>

<td align="center" width="33%"><input type="text" name="freeze" value=" " size="18"></td>

<!-- I want to Convert and incorporate this to working script> // -->

<td>Input Chemical Symbol</td>

<td><input type="text" size="20" maxlength="20" name="number"></td>

<td align=center colspan=2 BGCOLOR="#B6D4D2">
<input type="button" value="Chemical Symbol" onClick="display();">&nbsp;&nbsp;&nbsp;<input type="reset" value="Clear Values">

do
</tr>

</table>

</form>
</html>


Responses
Author: Narayanan             
Posted Date: September 29, 2011     Points: 20   

Hi,
when user clicks a "Chemical Symbol" what should it do? As per your code ,You call the Display() function .You didn't give any parameter value. so it will display undefined.So What exactly do you want?
Regards
Lakshmi Narayanan.S

Note: Don't repeat the Same question in the forum.


Regards, Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
Author: Narayanan             
Posted Date: September 29, 2011     Points: 20   

Hi,
refer this Post
http://forums.asp.net/p/1211504/2139016.aspx


Regards, Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
Author: pasaway cool             
Posted Date: October 12, 2011     Points: 20   

Thanks Narayanan for giving an attention to my query.Also sorry for the late reply.Hoping for your answer again.

What I want is the same output as when I click the hyperlink Rb it gives data such as
Name :Rubidium
Number:
Weight: 85.467
Melts: 38.89 C
Boils: 688 C

For example when I put a value in the text box field
Input Chemical Symbol (eg. Rb) and press the button Input Chemical Symbol it should also produce
Name :Rubidium
Number:
Weight: 85.467
Melts: 38.89 C
Boils: 688 C



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend