When I click on a link in web page.Link should open in new
window.can anyone please let me know the script for this

---Koti



When I click on a link in web page.Link should open in new window.can anyone please let me know the..

Answer / Chandan Kumar

[Script to open links in a new window using JavaScript] n
1. Create an HTML anchor tag with the desired URL as the href attribute:

<a href="your-url" target="_blank">Click here</a>

2. If you need to dynamically generate the link, use JavaScript to create and append the anchor tag to your page:nn var link = document.createElement('a');n link.href = 'your-url';n link.target = '_blank';n link.textContent = 'Click here';n document.body.appendChild(link);

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

Now it appears to be more than enough... I have learn entire QTP, I did whatever I could do but still facing lots of problem and those problems could be removed only after working in professional atmosphere. But still unable to expose myself as professionaly. It is becoming panic, It has been two years I am in manual testing and looking for the change but all the recruiters ask for QTP, but my problem is I don't have working experience with QTP. Kindly suggest me I really need effective suggestions. I dont have more caliber to work with present organization cause of salary reasons...boo.. hooo...hooo. My email address is alkaa.dugaal@gmail.com

0 Answers  


WHAT IS ETL TESTING.......

2 Answers  


How can we translate the steps between the Keyword and Expert Views?

1 Answers  


Explain key word driven frame work?How to use in real time?

2 Answers   HP,


Should have experience in framework means?

1 Answers  


What is RTM (require ment tracebulity marix) fromate?

1 Answers   Wipro,


WHICH PROCESS U FOLLOW IN COMPANY

1 Answers   IGT,


What is the Difference between test object and run time object?

1 Answers  


What is the Dynamic Scenario in QTP? And also anybody give the example for this?

3 Answers  


what is stlc and its contents?

1 Answers  


wt is the difference between global and action excel database in qtp?for example one action is calling another action the second action is using action excell sheet?if it is using global sheet what makes the difference?

2 Answers   Datamatics,


any challange that faced in your project? (please give me some examples in your project?

1 Answers  


Categories