Welcome to the E-Blah Community!
We would like to welcome you to our community and invite you to register an account or login.
Being a registered member is important, as it gives you several advantages over the normal Guest status. After registering you will be able to download files and images, post messages, and access member-only portions of the forum - just to name a few. Registration is quick and simple, and only takes about a minute of your time.

E-Blah Community    Technical Support    Forum Support  ›  Some buttons not working?
Users Browsing Forum
Yahoo! Bot and 1 Guests

Some buttons not working?  This thread currently has 197 views. Print
1 Pages 1 Recommend Thread
iCONICA
April 21, 2008, 2:15pm Report to Moderator Report to Moderator

E-Blah Member
Posts: 764
Gender: Male
Posts Per Day: 2.38
Reputation: 97.14%
Reputation Score: +34 / -1
Time Online: 11 days 3 hours 19 minutes
Location: Manchester UK
Hi, I've recently noticed that the "Click here to attach a poll" button and the advanced editor buttons don't do anything when they are clicked? like a hyperlink with no address.

If you go to my forum, make a dummy post then try to attach a poll, you'll see what i mean. I'm Puzzled by this.

Any Ideas guys?

Thanks.

Also why can't you use a hrefs here?

http://forum.i-conica.net



The Best Free Online Technical Support Community! (Click Here)

i-CONICA's Reputation: Increase

Visit The Best Free Technical Support Community In The World!
Logged Offline
Site Site Private Message Private message Windows Live Messenger WLM
vol7ron
April 21, 2008, 5:38pm Report to Moderator Report to Moderator
E-Blah Member
Posts: 106
Gender: Male
Posts Per Day: 0.44
Reputation: 100.00%
Reputation Score: +9 / -0
Time Online: 1 days 58 minutes
Location: Washington DC
Age: 25
Getting a JavaScript error on your page:
w.document.write('<html><body><div align="center"><a href="#" onclick="window.close(); return false"><img src="'+img+'"></a></div><script type="text/javascript">

You didn't terminate the string with a single quote  I'm not even sure where the function ends.

That whole IF statement seems "iffy"  Has someone been touching the script?
Code
126 function ImagecodeWinOpen(e) {
127
128      var img = (e)?e.target.src:window.event.srcElement.src;
129
130      var w = window.open('','IMG','titlebar,scrollbars,resizable');
131      if (w) {
132         w.document.write('<html><body><div align="center"><a href="#" onclick="window.close(); return false"><img src="'+img+'"></a></div><script type="text/javascript">
133            var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
134            document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
135            </script>
136            <script type="text/javascript">
137               var pageTracker = _gat._getTracker("UA-4119263-2");
138               pageTracker._initData();
139               pageTracker._trackPageview();
140            </script></body></html>'
141         );
141         w.document.close();
142      }
143 }
144


Okay after reviewing it, we see that your google-analytics is terminating the document.write string.  Because those are part of the overlying document.write() you'll have to escape out of the single quotes on line 134.  Put a \ before every single quote ~~~ \'



Increase vol7ron's Rating
Logged Offline
Private Message Private message Reply: 1 - 6
iCONICA
April 21, 2008, 11:26pm Report to Moderator Report to Moderator

E-Blah Member
Posts: 764
Gender: Male
Posts Per Day: 2.38
Reputation: 97.14%
Reputation Score: +34 / -1
Time Online: 11 days 3 hours 19 minutes
Location: Manchester UK
haha, Thank you Vol7ron, I made another thread here not knowing its the same problem, Because my firebug Firefox addon told me there was an error on that page, if you find that thread, its the same problem.

I used find/replace on the entire domain to ad that analyitics code after the /body tag. I didn't realize it would mess certain things up.

Thanks Though!

I'm not sure what you mean about the backslashes, i did read something about having to "escape" the quotes using the backslash in js but do i do that for all quotes in the page? or just those on 134? and do i "escape" all double or single or both quotes?




The Best Free Online Technical Support Community! (Click Here)

i-CONICA's Reputation: Increase

Visit The Best Free Technical Support Community In The World!
Logged Offline
Site Site Private Message Private message Windows Live Messenger WLM Reply: 2 - 6
Martin
April 21, 2008, 11:31pm Report to Moderator Report to Moderator

I love E-Blah
10 Series Support Team
Posts: 4,558
Gender: Male
Posts Per Day: 3.13
Reputation: 98.60%
Reputation Score: +211 / -3
Time Online: 35 days 19 hours 26 minutes
Location: UK
Age: 50
Just re-upload Common.js  



Martin's Reputation: Increase
Logged Offline
Site Site Private Message Private message Reply: 3 - 6
iCONICA
April 21, 2008, 11:32pm Report to Moderator Report to Moderator

E-Blah Member
Posts: 764
Gender: Male
Posts Per Day: 2.38
Reputation: 97.14%
Reputation Score: +34 / -1
Time Online: 11 days 3 hours 19 minutes
Location: Manchester UK
It's fixed now, i simply removed all analytics code from all the .js files in the forum. It's fine now. Thanks.

Ps. My site is being mirrored else where while my host is moving my site to one of their new servers so if you check that error it will still exist. i've updated the changes on the new Not live server.



The Best Free Online Technical Support Community! (Click Here)

i-CONICA's Reputation: Increase

Visit The Best Free Technical Support Community In The World!
Logged Offline
Site Site Private Message Private message Windows Live Messenger WLM Reply: 4 - 6
iCONICA
April 21, 2008, 11:34pm Report to Moderator Report to Moderator

E-Blah Member
Posts: 764
Gender: Male
Posts Per Day: 2.38
Reputation: 97.14%
Reputation Score: +34 / -1
Time Online: 11 days 3 hours 19 minutes
Location: Manchester UK
Quoted from Martin
Just re-upload Common.js  


I did think of that, but sometimes it's not practical to just reupload the originals as sometimes the files have changes in them, like my register.pl has the aditional username chars defined and routines.pl has something changed so all members have "notify on new replies" ticked by default.

Thanks guys!



The Best Free Online Technical Support Community! (Click Here)

i-CONICA's Reputation: Increase

Visit The Best Free Technical Support Community In The World!
Logged Offline
Site Site Private Message Private message Windows Live Messenger WLM Reply: 5 - 6
vol7ron
April 22, 2008, 7:47am Report to Moderator Report to Moderator
E-Blah Member
Posts: 106
Gender: Male
Posts Per Day: 0.44
Reputation: 100.00%
Reputation Score: +9 / -0
Time Online: 1 days 58 minutes
Location: Washington DC
Age: 25
You have to escape anything that you want printed.  JavaScript allows you to use single or double quotes to distinguish a string, but for those of you familiar with Regular Expressions, it uses a non-greedy approach.  It ends the string at the first end quote it encounters.


document.write('text here'); is the same thing as document.write("text here");  and they both output "text here" w/o the quotes.  But if you wanted to include quotes within them you'll have to escape the string designator from within.

document.write('i believe it's nothing');  would a yield an error because of the "it's" - notice the inner quote; however, the following would be okay:
document.write("i believe it's nothing"); because the single quote is wrapped in a double quote block, but there would be a problem with:
doucment.write("she said, "goodbye""); because the JavaScript engine is saying output "she said, " then it has an error at the goodbye then it sees an empty string ""

the solution is to tell it that the quotes are not ending the string you're passing it
document.write("she said, \"goodbye\""); -or-
document.write('i believe it\'s nothing');


With your specific code you're trying to dynamically write HTML and JavaScript to the page.  Given what I sent you (I copied from Firebug and formatted it a little for you, but I added a line or two so not all the #s are the same as the one's you'll find in Firebug), line 132 starts the document.write() and uses a single quote to specify the text and it looks like line 140 is where it ends.  That means any single quote between lines 132 and the end of 140 will need a backslash where appropriate.

If you notice in line 132, the backslash is not needed because those single quotes are on purpose.  They are concatenating the variable "img" with the rest of the string.  However, line 134 does need to escaped because those single quotes are meant to be whats passed to the unescape() function, not to terminate the parent document.write() started at 132.

So yes, only change the single quotes found in line 134.



Increase vol7ron's Rating
Logged Offline
Private Message Private message Reply: 6 - 6
1 Pages 1 Recommend Thread
Print

E-Blah Community    Technical Support    Forum Support  ›  Some buttons not working?