vb.net - create hyperlinks within VBscript array with variable output -


in effort redeem question: updated edit below.

<% domenu      dim products     dim manu     dim website      products = array("e-reader set: kindle paperwhite, $119","leather tote, $160","earrings, $88","skin care duo: moisturizer, $62","throw pillow, $90","vitamix 5200, $449","tea set: le creuset kettle, $1oo","spring nail polish collection, $51","framed birthstone print, $48","cotton robe, $25","jewelry box, $49","water bottle, $35","polka-dot scarf, $38","makeup set: eye palette, $44","sequin pouch, $88","ceramic set: jar, $22","honeycomb perfume, $54","3-jar jam set, $24","recipe box, $34","hair dryer, $200","epicurious 11-piece cookware set, $320","cookbook collection: 100 days of real food lisa leake, $20","threshold dining set: placemats, $10","sodastream genesis, $90","alexia necklace, $49","wild & wolf garden tool set, $33","rattan floor basket, $59","olivia burton watch, $105","yoga set: mat, $40","hair-care system: restore shampoo, $28","")     manu = array("leather case, $40","","","eye serum, $48","","","three organic tea blends, $50","","","","","","","lip palette, $40; brush set, $50","","mug, $18; tray, $15","","","","","","twelve recipes cal peternell, $20; better on toast jill a. donenfeld, $20","$10; napkins","","","","","","bag, $20; towel, $25","conditioner, $28; mask treatment, $4","")      website = array("www.amazon.com","www.baggu.com","www.sarahhealydesign.com ","www.kiehls.com","www.laylagrayce.com","www.vitamix.com","www.williams-sonoma.com","www.essie.com","www.minted.com","www.worldmarket.com","www.westelm.com","www.swellbottle.com","www.echodesign.com","www.maccosmetics.com","www.bodenusa.com","www.rosannainc.com","www.libraryofowers.com","www.murrayscheese.com","www.rifepaperco.com","www.shopt3micro.com","www.jcpenney.com", "www.amazon.com", "www.target.com", "www.surlatable.com","www.stelladot.com","www.burkedecor.com","www.landofnod.com","www.modcloth.com","www.gaiam.com","www.livingproof.com","") %> 

the above code populates content sections, in single dynamic one-page website. the problem is website outputs copy / text url. i need link, , preferably link out a target="_blank" new window. have tried below; via answered suggestion -- , while think may better practice doesn't seem run other arrays, , breaks site resolve white page only. i've tried including within other array structures within same include , separate , breaks site. have toggled name of arrurls website , declared dim arrurls etc etc , broke page still need solution.

dim arrurls  arrurls = array("www.amazon.com","www.baggu.com") x=0 ubound(arrurls)     currenturl = arrurls(x)     response.write("<a href=""http://""" & currenturl & """ target=""_blank"">" & currenturl & "</a>") next 

in past have done.. below jquery arrays , love similar solution inline , legible of perfect.

     { value: "nyc", url: 'http://www.nyc.com' },       { value: "la", url: 'http://www.la.com' },      { value: "philly", url: 'http://www.philly.com' }, 

you don't create hyperlinks in array. create them in code iterating array:

<%     dim arrurls, x, currenturl     arrurls = array("www.amazon.com","www.baggu.com")     x=0 ubound(arrurls)         currenturl = arrurls(x)         response.write("<a href=""http://" & currenturl & """ target=""_blank"">" & currenturl & "</a>")         if x < ubound(arrurls) response.write(" | ")     next %> 

simple that.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -