Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to run script written in Javascript using QTP 9.0
#1
Hello Everyone,

In my web page, I have an Input field(button) with event (onclick) calling a javascript function.
This javascript checks if any mandatory field (like text input for name) is not filled.

My Problem : When I made a record, if I left blank mandatory field, and click on Button, the event is not recorded.
Remark : If I enter value in mandatory field, it’s OK.


//My input fields
Code:
<input type="text" runat="server" id="name"> <input type="button" name="submit" onclick="jcpAction();"> //My javascript function cpAction() { var success =true; var nameinput = document.getElementById('name'); if(nameinput.value== '') { success = false; } return success; }

any suggestions??
Why QTP is not picking up above written Javascript?
Reply
#2
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to send/pass UFT Run Error Dialog as output value to main driver script lravi4u 0 1,179 11-05-2023, 03:55 PM
Last Post: lravi4u
  How do you Change Run mode mid script? Caleytown 6 8,813 03-25-2021, 08:27 AM
Last Post: RB26578
  How to run driver script to kick off scripts stored in QC? shipu 0 3,977 04-30-2014, 02:39 AM
Last Post: shipu
  Flight API does not run and QTP not recording the script Ruch 0 2,921 08-15-2013, 04:57 AM
Last Post: Ruch
Exclamation Getting run time error while executing the QTP script in command prompt. vishruth143 1 6,245 07-15-2013, 05:41 PM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)