Hello, I'm new to web2py. I've been putting together a site for a few weeks. I'm very impressed with the capabilities. I'm having a problem. I have a module that generates some html that I want to show the user so they can use it on their site (shopping cart). The html is a customized script for the user. I'm using python string template replacing variables from a dictionary. I then return the html to view. The problem I'm having is that the html is being shown in the view as is (below) instead of being resolved. If I take the HTML below and paste it into the view (edit) and save it, it shows on the page properly, resolved. grrr. I thought I had figured out a solution by using TAG helper. It showed properly on the page. The problem is that it quoted my javascript inside the HTML, rendering the HTML non-functional.
<link href="http://www.theFreightHub.com/_css/widget.css" rel="stylesheet" type="text/css" /> <table border="0" width="50%" cellpadding="0" cellspacing="0"> <tr> <td> <script type="text/javascript" language="javascript"> sWidgetID=4736; sCustID=55123; sWVerID=1; sZip='33626'; sLocationType=2; sPickupPalletizing=0; sInsidePickUp=0; sLiftGate=0; sLimitedAccess=0; sNotifyBeforePickUp=0; sTradeshow=0; DInsideDelivery=0; DLiftGate=0; DLimitedAccess=0; DNotifyBeforeDelivery=0; DTradeshow=0; PackagingType=4; Quantity=1; TWeight=500; Width=0.0; Height=0.0; Length=0.0; FClass=300; BlindShipment=0; Hazmat=0; strfinal=sZip + ',' + sLocationType + ',' + sPickupPalletizing + ',' + sInsidePickUp + ',' + sLiftGate + ',' + sLimitedAccess + ',' + sNotifyBeforePickUp + ',' + sTradeshow + ',' + DInsideDelivery + ',' + DLiftGate + ',' + DLimitedAccess + ',' + DNotifyBeforeDelivery + ',' + DTradeshow + ',' + PackagingType + ',' + Quantity + ',' + TWeight + ',' + Width + ',' + Height + ',' + Length + ',' + FClass + ',' + BlindShipment + ',' + Hazmat; var url; function gotratingpopup() { var FCtoZip = window.document.getElementById("FCtoZip"); var FCtoLocation=window.document.getElementById("FCtoLocation"); if (FCtoZip.value=='') { alert("Please enter destination postal code"); return; } var wind = window; var winop = wind.open; url='http://www.theFreightHub.com/web2py/theFreightHub/FreightOperations/RatePopup.html?RatePopup.aspx?destcode=' + FCtoZip.value + '&wid=' + sWidgetID + '&WVerID=' + sWVerID + '&unloadid=' + FCtoLocation.value + '&strfinal=' + strfinal; winop(url, null, 'left=400, height=285, width=610, status=0, resizable=0, scrollbars=0, toolbar=0, location=0, menubar=0'); } </script> <div id="FCborder"> <div id="FCpadding"> <div id="FCholder"> <div id="FCheader"> <h1> <span>Freight Shipping Calculator</span> </h1> <p>Fill out the fields below and press the orange button to get instant rates.</p> <img src="http://www.theFreightHub.com/web2py/theFreightHub/static/images/logo.png" width="200" height="40" alt="TheFreightHub" title="Click here to visit our homepage"/> </div> <div id="FCwidgetForm"> <div id="FCcontent"> <div id="FCinputTozip" class="FCinput"> <label for="FCtoZip">Enter Your U.S. Zip</label> <input id="FCtoZip" type="text" /> <input id="BogusTextBoxToPreventPostBackOnEnterKey" type="text" style="display:none"/> </div> <div id="FCinputTolocation" class="FCinput"> <label for="FCtoLocation">Select Location Type</label> <select id="FCtoLocation"> <option value="2">Business with Dock or Forklift</option> <option value="3">Business without Dock or Forklift</option> <option value="5">Construction Site</option> <option value="6">Convention Center or Tradeshow </option> <option value="1">Residence</option> <option value="4">Terminal</option> </select> </div> </div> <div id="FCbuttonHolder"> <input id="FCbutton" type="button" value="Get Rates -->" onclick="gotratingpopup();"/> </div> </div> <div id="FCfooter"> <p>Rates are subject to change based on time of calculation and data entered.<br /> © 2011 <a href="http://theFreightHub.com" style="float:none; margin:0">theFreightHub LLC</a> - All Rights Reserved</p> <div id="FCfooterLinks"> <a href="http://www.theFreightHub.com">http://www.theFreightHub.com</a> <a href="http://www.theFreightHub.com/web2py/theFreightHub/FreightOperations/shippingcalc">Create a Shipping Calculator</a> </div> </div> <div style="clear: both;"></div> </div> </div> </div> </td> </tr> </table> None

