Question

Locked

Help My web page opens half way down

By swineguy ·
Hi Everyone
If anyone can help me asap that would be great as my website went to crap today and I need it fixed. It opens with the cursor on the very last google form of the page ??? To see what it is doing go to www.organicgirl.ca
I really need this fixed soon. I have tried looking at any work I did today as it only started last night but can't find anything!

This conversation is currently closed to new comments.

10 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

Do you often repair your code blindfolded ? ...

by OldER Mycroft In reply to Help My web page opens ha ...

Because that's what anyone on TR will have to do.

However, since your site is only valid for US and Canadian residents, I will be leaving now.

Collapse -

Google form

by swineguy In reply to Help My web page opens ha ...

It always loads to the first place on the last Google form on the page. We tried different number posts per page and it was always just on the last one of the page?

Collapse -

Use a comments link

by seanferd In reply to Google form

and keep the per post comments (and entry textboxes) on separate pages from the main page. (If you can't code around this issue. But multiple entry boxes per page is quite cluttered anyway.)

When I loaded the page, it jumped all over the place as elements loaded, finally ending up at the bottom as the load finished.

Collapse -

JavaScript in the frames

by deity_chooch In reply to Help My web page opens ha ...

Each frame pointing to the Google form has JavaScript that tells the page the cursor needs to start there. The function in question is the .focus() one, displayed in the IFRAME source. This appears to be housed at Google and uneditable by end users. Here's the offending JavaScript:

<script type="text/javascript">

(function() {
var error = false;
var divs = document.getElementById('ss-form').
getElementsByTagName('div');
for (var j in divs) {
if (divs[j].className == 'errorbox-bad') {
error = true;
// The next line goes through nested divs to get to the entry.
divs[j].lastChild.firstChild.lastChild.focus();
break;
}
}
if (!error) {
for (var i in divs) {
if (divs.className == 'ss-form-entry' && divs.
firstChild.className == 'ss-q-title') {
divs.lastChild.focus();
break;
}
}
}
})();
</script>

Collapse -

Where is that script?

by swineguy In reply to JavaScript in the frames

Where did you find that script? Can I go delete it to fix it and make it start at the top again? Or is there something else I can include to override it?Thanks so much

Collapse -

IFRAME source

by deity_chooch In reply to Where is that script?

That script exists within the page called by the IFRAMEs (i.e. http://spreadsheets.google.com/embeddedform?key=tlaDjmSvUVqmyyd3rFvPNGQ). The JavaScript section is toward the bottom of said page. You can delete this or edit it to stop if you have write access to change the code of the form. I'd probably delete or comment out (using "//" at the beginning of the line) the following two lines:

divs[j].lastChild.firstChild.lastChild.focus();

divs.lastChild.focus();

Collapse -

Pull that post but never fixed it

by swineguy In reply to IFRAME source

We pulled the form that had that code and it still seems to be doing it

Collapse -

Here is another guy with same problem at google but no fix

by swineguy In reply to Pull that post but never ...

http://www.google.com/support/forum/p/Google+Docs/thread?tid=35bc55d9fade0c88&hl=en&fid=35bc55d9fade0c8800047124b6d3118f

Collapse -

Thanks

by swineguy In reply to Help My web page opens ha ...

Thanks
Google is going to deal with it as it is happening on all sites using their form service today!

Back to Web Development Forum
10 total posts (Page 1 of 1)  

Related Discussions

Related Forums