?
Solved

Forms using VbScript

Posted on 2004-04-06
9
Medium Priority
?
499 Views
Last Modified: 2012-06-27
I am trying to pass a a txt field into the form that is not part of the form is there anyway to do this, ive tried everything. The end result would be the form submitting to a CGI link using Post. The entire project is VbScript no Javascript please.

Thanks in advance.
Greg
0
Comment
Question by:gharman
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 2

Expert Comment

by:BobFett
ID: 10764988
Hi Greg,

When you say you are trying to 'pass' a text field in to a form, where are you passing it from?  Is the text field on the same page or another page?

Bob
0
 

Author Comment

by:gharman
ID: 10764994
A Text Field on the same page.
0
 
LVL 31

Expert Comment

by:alorentz
ID: 10765001
No, the point of the form tags is to send a form and it's contents.  If it's outside, it is useless when submitting a form.

What you could do is put a hidden field in the form, that is always the same a the text outside of the form, so that the value will submit with the form.  You will need to use an onchange or onblur event for the text outside of the form the update the hidden field.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:gharman
ID: 10765020
I fully realize the purpose of the from tags my goal in not using the form tags on the area is that the error checking is not good enough unless i can call a txtfield inside a form?

How would i set the value of a hidden field to another textboxt?

<input type="hidden" name="op1" value = (txt.value) >  ?????????

Greg
0
 
LVL 2

Expert Comment

by:BobFett
ID: 10765046
Hi Greg,

I'm afraid all of the things you describe are simple in javascript but as you've said you don't want to use it, I think your stuck.

Bob
0
 
LVL 31

Expert Comment

by:alorentz
ID: 10765071
Here is javascript:

<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--

function text2_onchange() {
window.form1.text1.value = window.text2.value;
}

//-->
</SCRIPT>
</HEAD>
<BODY>

<P>
<FORM action="" method=POST id=form1 name=form1>

<INPUT id=text1 name=text1>
</FORM>
<br><br>
<INPUT id=text2 name=hidden LANGUAGE=javascript onchange="return text2_onchange()"></P>
0
 
LVL 31

Accepted Solution

by:
alorentz earned 500 total points
ID: 10765081
Here is Client Side VbScript:

<SCRIPT ID=clientEventHandlersVBS LANGUAGE=vbscript>
<!--

Sub text2_onchange
window.form1.text1.value = window.text2.value
End Sub

-->
</SCRIPT>
</HEAD>
<BODY>

<P>
<FORM action="" method=POST id=form1 name=form1>

<INPUT id=text1 name=text1>
</FORM>
<br><br>
<INPUT id=text2 name=hidden></P>
0
 
LVL 31

Expert Comment

by:alorentz
ID: 10765104
Whoops:

Text2 is supposed to be like this: (type=hidden)

Javascript:
<INPUT type=hidden id=text2 name=text2 LANGUAGE=javascript onchange="return text2_onchange()">

VBScript:
<INPUT type=hidden id=text2 name=text2>
0
 

Author Comment

by:gharman
ID: 10765139
Used VB Script works like a charm thanks.

Greg
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question