Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

JavaScript and recordset fields

Posted on 2009-04-13
3
Medium Priority
?
582 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
[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
  • 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 2000 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

Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

Question has a verified solution.

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

If I have to fix slow responding website my first thoughts are server side optimizations: the database may not be optimized or caching is not enabled, or things like that. We often overlook another major part of our web application: the client. We o…
While opting for any web-to-print solution, you need to discuss with your team and some of your end users and know their opinions about your decisions. In this article we list down some questions you need to ask yourself.
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.

671 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