开发者

Need to changed markup with jQuery to work with thickbox iframe (2nd attempt)

This is a revised attempt at solving this issue. Excuse my noobness.

I have the following markup on a page of which I do not have direct access to...

<a href="javascript:void(0);" onclick="window.open('/BulkDiscounts.asp?ProductID=318&ProductCode=' + escape('LB30X40ES') + '&Orig_Price=22.95', 'Discounts', 'scrollbars,status,resizable,width=330,height=300');"><img src="/v/vspfiles/templates/100/images/buttons/btn_quantitydiscounts.gif" border="0" align="absmiddle"></a>

I need the above code to look like this so thickbox can open up a iframe...

<a href="/BulkDiscounts.asp?ProductID=318&ProductCode=LB30X40ES&Orig_Price=22.95&keepThis=true&TB_iframe=true&height=300&width=330" title="LB30X40ES Laundry Bags" class="thickbox"><img border="0" align="absmiddle" src="/v/vspfiles/templates/100/images/buttons/btn_quantitydiscounts.gif"></a>

I has originally thought of first adding a class of "thickbox" to the first set of code so I can target the first set of code easier and setit up so it can be used by Thickbox

Then what I would expect to do what to target the value in just after the productid= which in this case is "318" and put that in a variable, lets say var proid.

Then I would target the value in the escape('LB30X40ES') and put that in a variable, lets say var procode

Then I would target the value in orig_price which is 22.95 and put that is var proprice.

The do the same for height and width.

Then build the new href =/bulkDiscounts.asp?productid='proid' + &productcode +'procode' + &orig_price + 'proprice' + &keepThis=true&TB_iframe=true&height='height'+ &width + width

The figure out how to update the old markup with the new markup/href.

This is the best that I can explain it

The reason I have to use variable (I would think) for productid,productcode,orig_price,height and width is because they change depending on what product page is loaded.

Note this code is not needed in the new markup...

'Discounts', 'scrollbars,status,resizable

Hope this makes sense? An开发者_开发问答yone?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜