开发者

jquery/ajax shoutbox does not refresh content but does submit

I am currently making a shoutbox for a band website. It is almost done (except for styling of it). The whole concept of the shoutbox works. You can enter your name and message and it will submit. However there i开发者_C百科s a function in the script that makes the div refresh. This somehow doesnt work. You can try it here: http://basenharald.nl/3d/#shoutbox

If you submit, you will not see you message, now if you hit F5 you will. Meaning the shoutbox works, it simply does not refresh.

I used the same code that is used here: http://www.ajaxdaddy.com/demo-jquery-shoutbox.html

I think the jquery script somehow conflicts with the other scripts?

Could anyone please provide me a codesnippet to get this code working? Thanks in advance!


The message is added to the page. You can see it in the DOM. It is however never shown because your script never sets the elements style.display to 'block'.

The call to $('input[@name=message]').attr('value', '').focus(); (line 316) raise an unrecognized expression error generated by jQuery.

It seems you are using a newer version of jQuery. Which causes causes the error.

Removing this line should make it work again. To fix the line I think you only need to remove the '@'

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜