|
 |
|
|
07-31-2008, 11:00 AM
|
ASAP
|
Posts: 351
Name: Butch Begy
|
I believe I have developed a new tecnique for site navigation using xmlhttp request to update page content including partial or complete replacements of scripts, html, CSS... any page content whatsoever. The updates are written directly to the DOM and are not visible via "right click view page source". I intend to coin the acronym ASAP "Asynchronus Site Access Procedures" for this method. for more information contact Butchtroll@yahoo.com.
|
|
|
|
07-31-2008, 11:17 AM
|
Re: ASAP
|
Posts: 880
Name: Jacob
|
Why don't you just post more information.. specifically how it is implemented? I dont want to e-mail you.
|
|
|
|
07-31-2008, 11:28 AM
|
Re: ASAP
|
Posts: 351
Name: Butch Begy
|
It is quite simple really, I will assume you are familiar with AJAX, I use the xmlhttprequest object to send requests to ASP pages that provide page content, I then use DOM insertions to update any or all page content. An entire site could be navigated without ever having to load a new page. Certainly this method is not for all applications but it has great merit for many. It also is a great solution for the javascript single threaded problem, as requests are processed while page continues doing its "thing". If this is not a new idea it is at least a technique that needs a unique moniker, I propose ASAP, as it is a very quick and efficient way to update content.
|
|
|
|
07-31-2008, 11:44 AM
|
Re: ASAP
|
Posts: 351
Name: Butch Begy
|
Here is an example of server code:
Code:
Response.buffer=false
Response.Expires = -1000
db = "Provider = SQLOLEDB; Data Source = 72.36.160.58,7654; Network Library = DBMSSOCN; Initial Catalog = laxo;"
Set conn = Server.CreateObject ("ADODB.connection")
conn.open db
Response.Write("<div id = 'Header'>")
Response.Write(" <table border = '0'>" & vbcrlf)
Response.Write(" " & vbcrlf)
Response.Write(" <tr bgcolor="&cor&">" & vbcrlf)
Response.Write("</tr>" & vbcrlf)
Response.Write("</center>" & vbcrlf)
Response.Write("</table>" & vbcrlf)
If session("user") <> "" Then
Dim cor
SQL = "Select tipo From cliente Where id_cli =" & session("user")
Set x = conn.Execute(SQL)
If x(0) = 2 Then
SQL = "Select nupm From conf2 Where cli =" & session("user")
Set zz = conn.Execute(SQL)
SQL = "Select Top " & zz(0) & " p4.*, calls.time, calls.id_call From calls Inner Join cliente Inner Join p1 On cliente.id_cli = p1.clie Inner Join p2 On p1.id_p1 = p2.p1 Inner Join p3 On p2.id_p2 = p3.p2 Inner Join p4 ON p3.id_p3 = p4.p3 On calls.number = p4.c2 Where(cliente.id_cli = "&session("user")&") and calls.type<5 order by time desc"
Set z = conn.Execute(SQL)
Session("Latest") = z(16)
if session("user") <> "" then
SQL = "Select cliente, resp, tipo From cliente Where id_cli = "& session("user")
set x = conn.execute(Sql)
c = x(0)
n = x(1)
t = x(2)
end if
if session("user") = 1 then
Response.Write("<table id=Header>" & vbcrlf)
Response.Write(" <tr>" & vbcrlf)
Response.Write(" <td valign = 'bottom' style = 'border-bottom: 6 solid #EBE44E' colspan = '20'>" & vbcrlf)
Response.Write(" <b><font face = 'Arial' size = '2'><img border = '0' src = 'Interlix_logop_pq.jpg'></font></b> " & vbcrlf)
Response.Write(" <font color = '#C0C0C0'><font face = 'Arial Black' size = '3'>"&c&" - </font><font face = 'Arial' size = '2'><b>"&n&"</b></font></font> " & vbcrlf)
Response.Write(" <font color = '#FFFF00' face = 'Arial Black'><a href = 'b_monito.asp?ord = 1'><img border = '0' src = 'botao_monitor.gif'></a> </font> <font color = '#FF00FF'>" & vbcrlf)
Response.Write(" <a href = 'inscli.asp'><img border = '0' src = 'botao_cadastro.gif'></a> </font> <u><font size = '2' face = 'Arial Black'><a href = 'cli.asp'><img border = '0' src = 'botao_config.gif'></a></font></u> " & vbcrlf)
Response.Write(" <a href = 'b_monito.asp?ord = 1'><img border = '0' src = 'image_UpDown.gif'></a> <a href = 'fim.asp'><img border = '0' src = 'image_fechar.gif'></a></td>" & vbcrlf)
Response.Write(" </tr>" & vbcrlf)
else
Response.Write(" <tr>" & vbcrlf)
Response.Write(" <td valign = 'bottom' style = 'border-bottom: 6 solid #EBE44E' colspan = '20'>" & vbcrlf)
Response.Write(" <img border = '0' src = 'Interlix_logop_pq.jpg'></font></b> " & vbcrlf)
Response.Write(" <font color = '#C0C0C0'><font face = 'Arial Black' size = '3'>"&c&" - </font><font face = 'Arial' size = '2'><b>"&n&"</b></font></font> " & vbcrlf)
Response.Write(" <font color = '#FFFF00' face = 'Arial Black'><a href = 'b_monito.asp?ord = 1'><img border = '0' src = 'botao_monitor.gif'></a> </font> <font color = '#FF00FF'>" & vbcrlf)
Response.Write(" <a href = 'inscola.asp'><img border = '0' src = 'botao_cadastro.gif'></a> </font> <u><font size = '2' face = 'Arial Black'><a href = 'configp1.asp'><img border = '0' src = 'botao_config.gif'></a></font></u> " & vbcrlf)
Response.Write(" <a href = 'b_monito.asp?ord = 1'><img border = '0' src = 'image_UpDown.gif'></a> <a href = 'fim.asp'><img border = '0' src = 'image_fechar.gif'></a></td>" & vbcrlf)
Response.Write(" </tr>" & vbcrlf)
Response.Write("</table>" & vbcrlf)
Response.Write("</div>" & vbcrlf)
end if
while not z.eof
idz = z(0)
p3 = z(1)
c1 = z(2)
c2 = z(3)
c3 = z(4)
c4 = z(5)
c5 = z(6)
c6 = z(7)
c7 = z(8)
f1 = z(9)
f2 = z(10)
f3 = z(11)
f4 = z(12)
f5 = z(13)
f6 = z(14)
f7 = z(15)
tm = z(16)
id_c = z(17)
cor = "#E0E0E0"
Response.Write("<MARQUEE id = 'Marquee" & id_c & "' behavior = 'slide' SCROLLAMOUNT=4 SCROLLDELAY=10 Loop=0 TRUESPEED style='filter:progid:DXImageTransform.Microsoft.Fade(Duration=2)'>"&vbcrlf)
Response.Write("<table tag=" & id_c & ">" & vbcrlf)
Response.Write("<tr bgcolor = " & cor & "></tr>" & vbcrlf)
SQL = "Select p1.tit, p2.tit, p3.nome, p3.id_p3, p3.ft From p1 Inner Join p2 On p1.id_p1 = p2.p1 Inner Join p3 On p2.id_p2 = p3.p2 Where (p1.clie = " & session("user") & ") And (p3.id_p3 In (Select p3 From p4 Where (p4 = " & idz & ")))"
set v = conn.execute(SQL)
tx1 = v(0)
tx2 = v(1)
tx3 = v(2)
id = v(3)
ft = v(4)
Response.Write(" <tr>" & vbcrlf)
Response.Write(" <td colspan='18'><a id='datetime" & id_c & "' style = 'display:inline' style = 'margin-top: 0; margin-bottom: 0' align = 'left'><font color = '#C0C0C0' size = '1' face = 'Arial'><b>" & tm & "</b></font></a></td>" & vbcrlf)
Response.Write(" </tr>" & vbcrlf)
Response.Write(" <tr id = 'images" & id_c & "' style = 'display:block'>" & vbcrlf)
Response.Write(" <td valign = 'middle'><div><img id = 'Menos" & id_c & "' style = 'display:block' onclick = 'expd(this.id)' border = '0' src = 'image_menos.jpg'><div></td>" & vbcrlf)
Response.Write(" <td valign = 'middle'><div><img id = 'deletarA" & id_c & "' style = 'display:block' onclick = 'expd(this.id)' src = 'Check.gif' border = 0></div></td>" & vbcrlf)
Response.Write(" <td vAlign = 'middle' align = 'center'>" & vbcrlf)
if ft = 0 then
Response.Write(" <img border = '0' src = 'Capture3.gif'></div>" & vbcrlf)
else
Response.Write(" <img border = '0' src = 'p3_" & id & ".jpg' style = 'width:auto' onMouseOver = 'this.style.height = 150' onMouseOut = 'this.style.height = 50' onload = 'this.style.height=50'></div>" & vbcrlf)
end if
Response.Write(" </td>" & vbcrlf)
SQL = "Select id_conf1, id_conf, nc, mpf From conf1 Where (cli = " & session("user") & ") And (dm > 0) And (id_conf < 8) Order By dm"
set k = conn.execute(SQL)
Pic=0
while not k.eof
id = k(0)
tp = k(1)
nc = k(2)
cpf = k(3)
Response.Write(" <td valign = 'middle' align = 'right'>")
if cpf = 1 then
if tp = 1 then
Response.Write(" <a href = 'tf4c.asp?id = " & idz & "&c = 1' target = _blank>")
if f1 = 0 then
Response.Write("<img border = '0' src = 'Capture3.gif'>" & vbcrlf)
else
Response.Write("<img border = '0' src = 'p3_1_" & idz &".jpg' style = 'width:auto' onMouseOver = 'this.style.height = 150' onMouseOut = 'this.style.height = 50' onload = 'this.style.height=50'></div>" & vbcrlf)
end if
Response.Write("</a>")
end if
Response.Write("</td>" & vbcrlf)
Response.Write(" <td valign = 'middle' align = 'right'>")
if tp = 2 then
Response.Write(" <a href = 'tf4c.asp?id = " & idz & "&c = 2' target = _blank>" & vbcrlf)
if f2 = 0 then
Response.Write("<img border = '0' src = 'Capture3.gif'>" & vbcrlf)
else
Response.Write("<img border = '0' src = 'p3_2_" & idz & ".jpg' style = 'width:auto' onMouseOver = 'this.style.height = 150' onMouseOut = 'this.style.height = 50' onload = 'this.style.height=50'></div>" & vbcrlf)
end if
Response.Write("</a>" & vbcrlf)
end if
Response.Write("</td>" & vbcrlf)
Response.Write(" <td valign = 'middle' align = 'right'>")
if tp = 3 then
Response.Write(" <a href = 'tf4c.asp?id = " & idz & "&c = 3' target = _blank>" & vbcrlf)
if f3 = 0 then
Response.Write("<img border = '0' src = 'Capture3.gif'>" & vbcrlf)
else
Response.Write("<img border = '0' src = 'p3_3_" & idz & ".jpg' style = 'width:auto' onMouseOver = 'this.style.height = 150' onMouseOut = 'this.style.height = 50' onload = 'this.style.height=50'></div>" & vbcrlf)
end if
Response.Write("</a>" & vbcrlf)
end if
Response.Write("</td>" & vbcrlf)
Response.Write(" <td valign = 'middle' align = 'right'>")
if tp = 4 then
Response.Write(" <a href = 'tf4c.asp?id = " & idz & "&c = 4' target = _blank>" & vbcrlf)
if f4 = 0 then
Response.Write("<img border = '0' src = 'Capture3.gif'>" & vbcrlf)
else
Response.Write("<img border = '0' src = 'p3_4_" & idz & ".jpg' style = 'width:auto' onMouseOver = 'this.style.height = 150' onMouseOut = 'this.style.height = 50' onload = 'this.style.height=50'></div>" & vbcrlf)
end if
Response.Write("</a>" & vbcrlf)
end if
Response.Write("</td>" & vbcrlf)
Response.Write(" <td valign = 'middle' align = 'right'>")
if tp = 5 then
Response.Write(" <a href = 'tf4c.asp?id = " & idz & "&c = 5' target =_blank>" & vbcrlf)
if f5 = 0 then
Response.Write("<img border = '0' src = 'Capture3.gif'>" & vbcrlf)
else
Response.Write("<img border = '0' src = 'p3_5_" & idz & ".jpg' style = 'width:auto' onMouseOver = 'this.style.height = 150' onMouseOut = 'this.style.height = 50' onload = 'this.style.height=50'></div>" & vbcrlf)
end if
Response.Write("</a>" & vbcrlf)
end if
Response.Write("</td>" & vbcrlf)
Response.Write(" <td valign = 'middle' align = 'right'>")
if tp = 6 then
Response.Write(" <a href = 'tf4c.asp?id = " & idz & "&c = 6' target = _blank>" & vbcrlf)
if f6 = 0 then
Response.Write("<img border = '0' src = 'Capture3.gif'>" & vbcrlf)
else
Response.Write("<img border = '0' src = 'p3_6_" & idz & ".jpg' style = 'width:auto' onMouseOver = 'this.style.height = 150' onMouseOut = 'this.style.height = 50' onload = 'this.style.height=50'></div>" & vbcrlf)
end if
Response.Write("</a>" & vbcrlf)
end if
Response.Write("</td>" & vbcrlf)
Response.Write(" <td valign = 'middle' align = 'right'>")
if tp = 7 then
Response.Write(" <a href = 'tf4c.asp?id = " & idz & "&c = 7' target = _blank>" & vbcrlf)
if f7 = 0 then
Response.Write("<img border = '0' src = 'Capture3.gif'>" & vbcrlf)
else
Response.Write("<img border = '0' src = 'p3_7_" & idz & ".jpg' style = 'width:auto' onMouseOver = 'this.style.height = 150' onMouseOut = 'this.style.height = 50' onload = 'this.style.height=50'></div>" & vbcrlf)
end if
Response.Write("</a>" & vbcrlf)
end if
Response.Write("</td>" & vbcrlf)
end if
Response.Write(" <td></td>" & vbcrlf)
Response.Write(" <td></td>" & vbcrlf)
Response.Write(" <td></td>" & vbcrlf)
Response.Write(" <td></td>" & vbcrlf)
Response.Write(" <td></td>" & vbcrlf)
Response.Write(" <td></td>" & vbcrlf)
Response.Write(" <td></td>" & vbcrlf)
Response.Write(" </tr>" & vbcrlf)
k.movenext
wend
SQL = "Select id_conf1, id_conf, nc, mpf From conf1 Where (cli = " & session("user") & ") And (dm > 0) And (id_conf < 8) Order By dm"
set k = conn.execute(SQL)
Response.Write(" <tr id = 'text'>" & vbcrlf)
Response.Write(" <td valign = 'middle'><img id = 'Mais" & id_c & "' style = 'display:none' onclick = 'expd(this.id)' border = '0' src = 'image_mais.jpg'></td>" & vbcrlf)
Response.Write(" <td valign = 'middle'><img id = 'deletarB" & id_c & "' style = 'display:none' onclick = 'expd(this.id)' border = '0' src = 'Check.gif'></td>" & vbcrlf)
Response.Write(" <td><font face = 'Arial' size = '2'>"&tx3&"</font></td>" & vbcrlf)
while not k.eof
id = k(0)
tp = k(1)
nc = k(2)
cpf = k(3)
Str=" <td><font face = 'Arial' size = '2'>"
if tp = 1 then
Str=Str&c1
end if
Response.Write(Str&"</font></td>" & vbcrlf)
Str=" <td><font face = 'Arial' size = '2'>"
if tp = 2 then
Str=Str&c2
end if
Response.Write(Str&"</font></td>" & vbcrlf)
Str=" <td><font face = 'Arial' size = '2'>"
if tp = 3 then
Str=Str&c3
end if
Response.Write(Str&"</font></td>" & vbcrlf)
Str=" <td><font face = 'Arial' size = '2'>"
if tp = 4 then
Str=Str&c4
end if
Response.Write(Str&"</font></td>" & vbcrlf)
Str=" <td><font face = 'Arial' size = '2'>"
if tp = 5 then
Str=Str&c5
end if
Response.Write(Str&"</font></td>" & vbcrlf)
Str=" <td columnspan = '3'><font face = 'Arial' size = '2'>"
if tp = 6 then
Str=Str&c6
end if
Response.Write(Str&"</font></td>" & vbcrlf)
Str=" <td columnspan = '3'><font face = 'Arial' size = '2'>"
if tp = 7 then
Str=Str&c7
end if
Response.Write(Str&"</font></td>" & vbcrlf)
Response.Write(" <td></td>" & vbcrlf)
k.movenext
wend
Response.Write("</tr>")
z.movenext
Response.Write("<hr width='100%' size='3' color='#EBE44E'/>" & vbcrlf)
Response.Write("</marquee>" & vbcrlf)
wend
end if
end if
conn.close
RespStr = RespStr + "content"
Response.Write(RespStr)
could be used instead of multiple Response.Writes.
Last edited by Sleeping Troll; 07-31-2008 at 11:45 AM..
|
|
|
|
07-31-2008, 12:18 PM
|
Re: ASAP
|
Posts: 880
Name: Jacob
|
How do search engines respond to the content generated? That is going to be a big factor. Can you post a link to the script in action also?
|
|
|
|
07-31-2008, 12:37 PM
|
Re: ASAP
|
Posts: 351
Name: Butch Begy
|
Unfortunatley, no, it is a secure site. As for search engines, I don't know, someone should investigate and write a blog on it, do you know anybody with SEO skills who might be interested?
The way I came up with this is that I was "fixing" a site for some folks who knew VBscript ASP and SQL but had no javascript knowledge. You can imagine the tangled nest they wove, the simplest way for me to untangle it was to seperate the html from the VBscript via this method and use DOM insertions to place html in page. It provided some advantages I had not anticipated.
Last edited by Sleeping Troll; 07-31-2008 at 01:48 PM..
|
|
|
|
07-31-2008, 12:39 PM
|
Re: ASAP
|
Posts: 351
Name: Butch Begy
|
I will write a sample for your pleasure and post it here.
|
|
|
|
07-31-2008, 12:55 PM
|
Re: ASAP
|
Posts: 5,662
Name: John Alexander
|
Quote:
Originally Posted by Sleeping Troll
Unfortunatley, no, it is a secure site. As for search engines, I don't know, someone should investigate and write a blog on it, do you know anybody with SEO skills who might be interested?
|
As you said, the content isn't visible through a view source, so it's 100 % hidden from search engines. You won't be punished for cloaking, but you won't come up ( even in last place) for any of what's delivered this way. As far as the search engines are concerned, no content delivered this way exists on your site.
That isn't to say this idea should never be used - just answering the question.
|
|
|
|
07-31-2008, 01:30 PM
|
Re: ASAP
|
Posts: 351
Name: Butch Begy
|
Is there a method for making the content visible?
|
|
|
|
07-31-2008, 01:33 PM
|
Re: ASAP
|
Posts: 351
Name: Butch Begy
|
Another advantage from a security stand point is that the httprequest header need never be used. no more Thissite.asp?sensitiveinformation= "for all to see and hack!"
|
|
|
|
07-31-2008, 03:13 PM
|
Re: ASAP
|
Posts: 10,017
Location: Tennessee
|
If nothing is visible thru view source - what happens for text-only browsers and things like screen readers ?? If they see nothing, then the site would be totally inaccessible to those technologies.
<font> tags and tables ?? yeesh..... I hope that's JUST an example !
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
Please login or register to view this content. Registration is FREE
Please login or register to view this content. Registration is FREE
|
|
|
|
07-31-2008, 04:36 PM
|
Re: ASAP
|
Posts: 351
Name: Butch Begy
|
Everything is in the DOM, The browser "Sees" all.
|
|
|
|
07-31-2008, 09:25 PM
|
Re: ASAP
|
Posts: 3,987
Name: Abel Mohler
Location: Asheville, North Carolina USA
|
It shouldn't be long before screen-readers and search-engines should read dynamically generated text and content like this well enough for it to pass muster.
Search Engines, however, will take their time implementing anything, in my opinion, because of the "Pandora's Box" it opens in regards to black-hat SEO that people will attempt because, Google, say, chooses to recognize text that is not in the static HTML.
__________________
I build web things. I work for the startup Please login or register to view this content. Registration is FREE
.
|
|
|
|
07-31-2008, 09:55 PM
|
Re: ASAP
|
Posts: 351
Name: Butch Begy
|
Yeah <font> tags and <tables> all mixed in with vbscript, freakin' nightmare! but fortunately I was able to untangle the two via xmlhttprequest! Also tables did have a place in this site it was basically a listing of database records. I forget though, who introduced xmlhttprequest?
Last edited by Sleeping Troll; 07-31-2008 at 09:58 PM..
|
|
|
|
08-01-2008, 03:14 AM
|
Re: ASAP
|
Posts: 42,381
Name: Chris Hirst
Location: Blackpool. UK
|
Quote:
Originally Posted by Sleeping Troll
Everything is in the DOM, The browser "Sees" all.
|
Not necessarily!
ONLY javascript enabled, or more specifically, only xmlHttpRequest enabled browsers will see any content.
Text only browsers are not js enabled.
Many of the assistive technology devices are not js enabled
Search engine crawlers are not js enabled.
Opera before Ver7.6 was not xmlHttpRequest enabled but was js enabled, and users of other browsers can "turn off" javascript if they so wish
Quote:
|
who introduced xmlhttprequest?
|
Microsoft. It started life as an ActiveX object when IE 5.0. launched.
Provided that this is something is only ever going to be used in a known environment, eg: corporate LAN (Been there, done this). It isn't a problem, BUT if it were to be used in a anonymous public facing system, it needs the same treatment as Flash does.
ie:
A parallel site using "conventional" HTTP requests.
__________________
Chris. ->> Please login or register to view this content. Registration is FREE <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
|
|
|
|
08-05-2008, 01:23 PM
|
Re: ASAP
|
Posts: 2
Name: molchun
|
I will write a sample for your pleasure and post it here.
|
|
|
|
|
« Reply to ASAP
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|