Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


VBScript from asp to html

 
Logged in as: Guest
arrSession:exec spGetSession 2,3,797
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> ASP >> VBScript from asp to html
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 VBScript from asp to html - 3/10/2003 11:27:36 AM   
  Marcel2

 

Posts: 1
Score: 0
Joined: 3/10/2003
From: Netherlands
Status: offline
I did get a asp page with vbscript into it but my provider is not suporting asp and I do know nothing about vbscript so I realy hope you can help me to get the code work in a html page if possible.

<%@ language=VBScript%>
<%
dim objXMLHTTP
dim thezipcode
thezipcode = 48430
URL = "http://wwwa.accuweather.com/adcbin/public/local_index_print.asp?partner=accuweather&zipcode=" & thezipcode & "&metric=0"
Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objXMLHTTP.Open "GET", URL, false
objXMLHTTP.Send

If InStr(objXMLHTTP.responsetext, "<tr bgcolor=""#ffffff"">") = 0 Then
start = 0
else
start = InStr(objXMLHTTP.responsetext, "<tr bgcolor=""#ffffff"">")
end if

If InStr(objXMLHTTP.responsetext, "<tr bgcolor=""#E5E1D9"">") = 0 Then
finish = 1
else
finish = InStr(objXMLHTTP.responsetext, "<tr bgcolor=""#E5E1D9"">")
amount = finish - start
extract = Mid(objXMLHTTP.responsetext,start,amount)
end if

extract = Replace(extract, "http://vortex.accuweather.com/phoenix2/images/common/icons/", "")
extract = Replace(extract, "RealFeel[TM]", "Feels Like")
extract = Replace(extract, "RF", "Feels Like")

'Response.Write "<hr>"
'Response.Write "

HTML Code forà"&URL&"

"
'Response.Write "<textarea rows=30 cols=120>"
Response.write "<table width=""315"" cellpadding=""6"" cellspacing=""0"" border=""0"">"
Response.Write extract 'objXMLHTTP.responseText
Response.write "</table>"
Response.write "ààààààà<font size=""-1""><a href=""http://weather.flipmode.com"">Powered by Weather Connect</a></font>"
'Response.Write "
 
 
Post #: 1
 
 Re: VBScript from asp to html - 8/17/2004 10:29:28 PM   
  Matt

 

Posts: 30
Score: 0
Joined: 8/17/2004
From: United Kingdom
Status: offline
Could be card to near impossible as - ASP with VBscript runs on the server HTML runs on the clients PC.

Sorry.

(in reply to Marcel2)
 
 
Post #: 2
 
 Re: VBScript from asp to html - 9/15/2004 2:48:03 AM   
  dalejwright22

 

Posts: 11
Score: 0
Joined: 9/15/2004
From: United Kingdom
Status: offline
as mat says, ASP is a serverside technology, however VBscript can be used server and clientside. I would say it is possible to rewrite this code using Vbscript clientside (however, remember that there is ppl out there who use Netscape etc) so it would be best to use JavaScript.. Do a search on some Javascript forums and see if some can help you out... I know for certain that JavaScript has a function for redirecting pages..

cheers

dale

(in reply to Marcel2)
 
 
Post #: 3
 
 Re: VBScript from asp to html - 11/16/2004 7:28:48 AM   
  cconn

 

Posts: 3
Score: 0
Joined: 11/16/2004
From:
Status: offline
The javascript redirection function is like this:
<script type="text/javascript>
<!--
document.location = "http://www.your_new_url_here.com";
// -->
</script>

(in reply to Marcel2)
 
 
Post #: 4
 
 Re: VBScript from asp to html - 11/16/2004 7:35:06 AM   
  cconn

 

Posts: 3
Score: 0
Joined: 11/16/2004
From:
Status: offline
And from what I can gather from the OP, they're trying to stuff the resulting web page into their site.
The best way to accomplish this (without using ASP), would be to use an HTML <IFRAME>

E.G.
<html>
<body>
<!-- all of the other web page code here -->

<IFRAME NAME="weather" SRC="http://wwwa.accuweather.com/adcbin/public/local_index_print.asp?partner=accuweather&zipcode=48430">
</IFRAME>

</body>
</html>

However, if you want to allow them to enter the ZIP code on your web page, simply reset the IFRAME source, by doing something like this:
<A href="http://wwwa.accuweather.com/adcbin/public/local_index_print.asp?partner=accuweather&zipcode=19720" target="weather">Weather for 19720</a>

(in reply to Marcel2)
 
 
Post #: 5
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> ASP >> VBScript from asp to html Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts