Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

DataArea.InnerHTML problem

Posted on 2009-04-29
2
Medium Priority
?
1,061 Views
Last Modified: 2012-06-21
Hi guys,
I have the following hta script that im having issues with.
What Im trying to achieve is when I click on the Run Button, a hyperlink populates the span area.
But im getting an error when I do this.

Line 16 Char 26 Syntax error.

Any help greatly appreciated.
<html>
<head>
<title>HTA Test</title>
<HTA:APPLICATION 
     ID="objTest" 
     APPLICATIONNAME="HTA Template"
     SCROLL="yes"
     SINGLEINSTANCE="yes"
     WINDOWSTATE = "maximize"
>
 
 
<SCRIPT LANGUAGE="VBScript">
 
Sub RunScript
    DataArea.InnerHTML = <a href="http://www.microsoft.com/technet/scriptcenter" target="blank">Script Center</a href>
 
End Sub
 
 
</SCRIPT>
 
</head>
 
 
 
<body>
 
 
 
<span id=DataArea>This is a span area named DataArea</span>
 
<input id=runbutton  class="button" type="button" value="Run Button" name="run_button"  onClick="RunScript">
 
</body>

Open in new window

0
Comment
Question by:Simon336697
2 Comments
 
LVL 7

Accepted Solution

by:
dineesh earned 2000 total points
ID: 24267618
hi try this code..

regards
Dinesh

<html>
<head>
<title>HTA Test</title>
<HTA:APPLICATION 
     ID="objTest" 
     APPLICATIONNAME="HTA Template"
     SCROLL="yes"
     SINGLEINSTANCE="yes"
     WINDOWSTATE = "maximize"
>
 
 
<SCRIPT LANGUAGE="VBScript">
 
Sub RunScript
Mytest="<a href=""http://www.microsoft.com/technet/scriptcenter"" target=""blank"">Script Center</a href>"
 
DataArea.InnerHTML = Mytest
 
End Sub
 
 
</SCRIPT>
 
</head>
 
 
 
<body>
 
 
 
<span id=DataArea>This is a span area named DataArea</span>
 
<input id=runbutton  class="button" type="button" value="Run Button" name="run_button"  onClick="RunScript">
 
</body>

Open in new window

0
 
LVL 1

Author Comment

by:Simon336697
ID: 24267965
dineesh thank you mate so much..that did it :>)
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

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

Script to copy or move mouse-selected collection of files plus targets referenced by shortcuts (.lnk) The purpose of this article is to help illuminate the real challenges and options available (where they may exist) for utilizing simple scriptin…
Welcome, welcome!  If you are new to the series and haven't been following along, please take a brief moment to review the first three installments: Part 1 (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/A_266-VBScri…
Integration Management Part 2
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses
Course of the Month11 days, 10 hours left to enroll

564 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