Jump to content

10 weber

Members
  • Content Count

    44
  • Joined

  • Last visited

Community Reputation

0 Neutral

About 10 weber

  • Rank
    Newbie
  • Birthday February 1
  1. Anybody?Maybe it could help if I didn't use HTML5 attributes in the example, as in:<asp:TextBox ID="txt1" type="password" style="color:blue;" ...>
  2. I wrote in a web masterpage <div style="display:inline-block; background-image:url(Images/star.svg); width:<%=((int)Session["adminLevel"] * 31) %>px; height:30px;"></div><div style="display:inline-block; background-image:url(Images/emptyStar.svg); width:<%=(93 - (int)Session["adminLevel"] * 31) %>px; height:30px;"></div> to show users their adminLevel parameter. It's supposed to show a bar of 3 stars, some of which are full and the other empty. To do that I wrote Server Error in '/' Application.Object reference not set to an instance of an object.Descrip
  3. Is it possible to add HTML attributes to asp.net controls directly? i.e. as control attributes (<asp:TextBox ID="txt1" pattern="\w{2,}( \w{2,})*" required="required" ...>) instead of using JavaScript (document.getElementById("txt1").setAttribute("pattern","\w{2,}( \w{2,})*");document.getElementById("txt1").setAttribute("required","required");).
  4. Is there a way to get the handlers of an element? For example, say we have executed window.addEventListener("click",...); and we want to get it's handler. If it had been added with window.onclick = ... it would have been easy, but what do we do in this case?
  5. Is there a way to access the style of selected content without the window.getSelection() JS function?
  6. 10 weber

    <canvas>

    I tried to change preview() tofunction preview(x, y) { cntxt.beginPath(); cntxt.clearRect(0, 0, cnvs.width, cnvs.height); cntxt.restore(); cntxt.save(); cntxt.moveTo(lastX, lastY); cntxt.lineTo(x, y); cntxt.stroke();} but it still doesn't work.
  7. 10 weber

    <canvas>

    Firefox (using firebug), chrome and opera didn't find any errors.If I run clear after restore it erases the lines that (should) have been restored.
  8. 10 weber

    <canvas>

    That's what cntxt.restore() (in preview()) should do - draw the saved lines (saved with cntxt.save() in beginLine()). For some reason it doesn't work.
  9. I'm not sure I understand, but you can copy the next code to the Tryit Editor:<html><head><script type="text/javascript">var iframe;window.onload = function(){iframe = open("", "iframe");};</script></head><body><iframe name="iframe" style="width:100%;"></iframe><br/><input type="text" id="url" style="width:100%;" /><br/><button onclick="document.getElementById('url').value = iframe.location.href;">getURL</button><button onclick="iframe.location.href = document.getElementById('url').value;">setURL</button>
  10. You can open the iframe with the JS window.open function and get it's url by using location.href://define:var iframe = open([i]url[/i], [i]iframe's_name[/i]);//getURL:iframe.location.href
  11. 10 weber

    <canvas>

    I tried to use the canvas tag to allow users to draw shapes, but drawing a new line causes all other lines to disappear. <!DOCTYPE html><[color="#0000FF"]html[/color]><[color="#0000FF"]head[/color]> <![color="#FF0000"]-- ... --[/color]> <[color="#0000FF"]script [/color]type="[color="#FFA500"]text/javascript[/color]"> //<![CDATA[ var cnvs, cntxt; window.onload = function () { cnvs = document.getElementById("cnvs"); cntxt = cnvs.getContext("2d"); //... };[b] var lastX, lastY; function begi
  12. I'm looking for a good ASP.NET-C# tutorial online. Can anyone recommend something? (W3schools use VB script and the tutorials in Google are not comprehensive enough)
  13. I prefer not to ask users to change their settings, and using JS will significantly increase loading time (the page contains hundreds of inputs). Are you sure there's nothing to change that?
×
×
  • Create New...