PROBLEM: document.body.outerHTML via bookmarklet

S

Smugsboy

Hi,
Got a problem here. I'm trying to create a bookmarklet on IE6, that
passes the outerHTML of the body element as a GET param my site.

The problem is that for some page (ie mail.yahoo.com) the bookmarklet
does not work while for other pages (simpler ones) it does work.

Any idea ? Can it be something regarding size of GET param ?

Thanks,
 
R

Richard Cornford

Smugsboy said:
Got a problem here. I'm trying to create a bookmarklet on
IE6, that passes the outerHTML of the body element as a
GET param my site.

The problem is that for some page (ie mail.yahoo.com) the
bookmarklet does not work while for other pages (simpler
ones) it does work.

Any idea ? Can it be something regarding size of GET param ?

There are practical upper limits to the size of the data that can be
sent on the query string of a URL with a GET request. Windows IE, for
example, will not send more than about 2KB, which is likely to be less
than the size of most complex pages.

Richard.
 
S

Smugsboy

I'm trying to get only the form data, which I verified is less than 1Kb
on the test page I use.

I use the following syntax:
s="";
formHTML=document.body.getElementsByTagName("form");
if(formHTML!=null)
{
for(i=0;i<formHTML.length;++i)
{
s+=formHTML.outerHTML;
}
}

On "simple" pages it works fine, on more complex ones I get a syntax
error for the outerHTML line.
If I embed this code within an html document (not as bookmarklet) it
works fine.

Any ideas ?

Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top