PDA

View Full Version : Mobile style breaks if javascript is added to footer template


develop_827
10-27-2011, 10:21 AM
Mobile style breaks if javascript is added to footer template.

Here is the problem:

1) Add the code to footer template:

<vb:literal><script type="text/javascript"><!--
document.write("vBulletin Mobile doesn't work")
//--></script></vb:literal>

2) Open Mobile style page WITH ANY anchor in URL (for example add "#test" at the end of URL).
The page will be loading till the end of time and will contain only text "vBulletin Mobile doesn't work".

My actual javascript counter code is more complicated.

Why does the code above breaks Mobile Style?
Why does the page source contain ONLY text "vBulletin Mobile doesn't work"?
How can I change my javascript to work fine?

develop_827
10-31-2011, 09:55 PM
Nobody knows?
((

MaXimus
11-21-2011, 07:52 AM
hope someone can help, perhaps contact the mobile style developer?

Lynne
11-21-2011, 06:09 PM
I just added that exact text to the bottom of my mobile footer and then added #test to the end of my URL and it works just fine.

develop_827
11-22-2011, 04:51 PM
Lynne, did you try to reload page with #test?
Adding #test to opened URL and pressing Enter key does no request to the server.

Sorry if it was obvious for you.

I have reproduced it 2 minutes ago on 4.1.8 (with mobile style from 4.1.6).

Lynne
11-22-2011, 06:10 PM
I added the #test to the end of the URL and tried reloading the page several times. Nothing happened. Perhaps it is page specific?

Try upgrading your mobile style. I believe there were many mobile changes in 4.1.7. https://www.vbulletin.com/forum/showthread.php/388883-vBulletin-4-1-7-is-now-available-for-download?p=2216358&viewfull=1#post2216358