开发者

iFrame.src truncating get variables?

开发者 https://www.devze.com 2023-02-17 00:28 出处:网络
I have the following code to set开发者_如何学Python the src of an iFrame alert(this.options.url);

I have the following code to set开发者_如何学Python the src of an iFrame

    alert(this.options.url);
    this.iframe.src = url || this.options.url;

The alert reads

user_messages_new.php?to_user=bob marley&to_id=abatu&

The source produced (firebug) reads

src="javascript:false;"

And the iFrame loads

user_messages_new.php

What the hell is going on?


I think you want to change this.iframe.src = url || this.options.url; to this.iframe.src = this.options.url; If "url" were null, your code would work as is, but since it's false, it isn't working.

0

精彩评论

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

关注公众号