Skip to main content

Bug Tracker

Side navigation

#7765 closed bug (invalid)

Opened December 13, 2010 04:15PM UTC

Closed December 13, 2010 04:33PM UTC

Last modified March 13, 2012 08:56PM UTC

jQuery IE8 error on <a onclick>

Reported by: anonymous Owned by:
Priority: undecided Milestone: 1.6
Component: unfiled Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:
Description

I'm using simple ajax to load data from server with php and passing it thru selector.load() jQuery function. when using firefox or other browser, the script went well and the needed function is run smoothly. but when i use IE (6,7,8) it shows error script and the page is not working.

this is the script that i use;

<a onclick='javascript:dlg('var1'.'var2');'>blabla</a>

where dlg is some jquery function

is <a onclick=''> is not working on IE? how to resolve it? im using jquery 1.4.4, thanks.

Attachments (0)
Change History (2)

Changed December 13, 2010 04:28PM UTC by anonymous comment:1

This is the function that I use



function dlg(artid,artrev) {
        var scrollable = jQuery("#itemdetail_dialog");
        scrollable.empty();
        var loading = jQuery('<div class="loading"><img src="imgs/apps/ajax.gif" width="16px" Height="16px" /><br /><br />Loading...</div>').appendTo(scrollable);
        var a = scrollable.load("libs/php/getitemdetail.php?info="+artid+"&rev="+artrev+"");
        if (a != "") {
            loading.hide();
            scrollable.dialog('open');
        }

and this is the ajax content

echo "<a title='$rowp[1]' onclick='javascript:dlg(%26apos;var1%26apos;,%26apos;var2%26apos;);'>";
$content = CutString(html2txt($rowp[11]),350);
                                
echo "<div style='display:inline; vertical-align:top;'>";
echo "<div style='float:left; width:70px; margin:5px 0 0 5px;'>";
echo "<img src='imgs/docs/$rowp[12]' width='60px' />";
echo "</div>";
echo "<div style='float:left; margin-left:7px;width:500px'>$content</div>";
echo "<div style='clear:both'></div>";
echo "</div>";
echo "</a>";

Changed December 13, 2010 04:33PM UTC by rwaldron comment:2

resolution: → invalid
status: newclosed

This is not a jQuery bug.

You have a period between your arguments instead of a comma, and "dlg" is not a jQuery function.

<a onclick='javascript:dlg('var1'.'var2');'>blabla</a>