Solved

JavaScript and recordset fields

Posted on 2009-04-13
3
553 Views
Last Modified: 2012-05-06
if (document.getElementById('FormID').value == '{327C805C-BF7A-4541-87E8-33AD24A23F6D}') {
              var myTextField1 = document.getElementById('TCO Career Field');
  alert("Please provide values for all fields.");
              }
I would like to replace
                                    (document.getElementById('FormID').value == '{327C805C-BF7A-4541-87E8-33AD24A23F6D}')

with if (RS("form") = "Test  Memo"

Can I do it by
   if (<%rs("fORM")%> = "Test memo")

This code will be inserted in JavaScrip portion of asp page.


In other words, how can I pass the value of objRS fields to JavaScript
Thanks

0
Comment
Question by:Faye_DBA
  • 2
3 Comments
 
LVL 29

Expert Comment

by:David H.H.Lee
ID: 24135955
Hi Faye_DBA,
Yes, you're almost there. You can refer the asp variable inside javascript block.
Here is the example:
eg:
  if ('<%=rs("fORM")%>' = "Test memo")

0
 

Author Comment

by:Faye_DBA
ID: 24137302
Thanks apparantly what I am trying to do is not working because the value of the form equals values of two fields in the table. On the submit form processing this rs("form") causes problems.
Now I have a new question:
What happens to the hidden elements on form submit?

Thanks

0
 
LVL 29

Accepted Solution

by:
David H.H.Lee earned 500 total points
ID: 24144363
Hi Faye_DBA,
>>..the value of the form equals values of two fields in the table. On the submit form processing this rs("form") causes problems.
Perhaps you can post the related code snippet here?

>>..Now I have a new question:
What happens to the hidden elements on form submit?
- It's good to clarify all the question in initial first post for better solution. Otherwise, it'll become never ending thread. But, i can assist on this further question if you can give more details about mentioned?

0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
I need a solution to a Webpage for Wholesale Availability. 11 49
VBA for Outlook Web App 5 403
Website authentication - asp.net 3 82
Grunt script for Build Process 1 25
Foolproof security solutions has become one of the key necessities of every e-commerce or Internet banking website. If you too own an online shopping site then its vital for you to equip your web portal with customer security features that can allow…
Introduction A frequently used term in Object-Oriented design is "SOLID" which is a mnemonic acronym that covers five principles of OO design.  These principles do not stand alone; there is interplay among them.  And they are not laws, merely princ…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

785 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