Jump to content

Search the Community

Showing results for tags 'JAVASCRIPT'.

The search index is currently processing. Current results may not be complete.
  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

  1. alzami

    Math.pow

    whay it gives me NAN Math.pow(-.39,0.33); if you want u can check my previous posts where i made a calculator and check "x^y" button actually here var cube2 value is giving NAN; function solve_cube(){ var m=document.getElementById("gets"); var n=document.getElementById("divs"); n.style.display="none"; var a=prompt("put coeff of x^3"); var b=prompt("put coeff of x^2"); var c=prompt("put coeff of x"); var d=prompt("put value of d"); var front=(-b/(3*a)); var three=2*Math.pow(b,3)-(9*a*b*c)+27*(a*a)*d; var last=Math.pow((b*b-3*a*c),3); var under_root=(three*three)-(4*last); var root=Math.sqrt(under_root); var for_cube_root1=(1/2)*(three+root); var for_cube_root2=(1/2)*(three-root); alert(for_cube_root1); var cube1=Math.pow(for_cube_root1,0.33); var cube2=Math.pow(for_cube_root2,0.33); cube1=(1/(3*a))*cube1; cube2=(1/(3*a))*cube2; var x1=front-cube1-cube2; m.value="x1 = "+x1; }
  2. I'm trying to write some regex's for some input validation I need to do in an app, and while I can achieve the results I want, I wondering if I can combine or refine the couple regex's I am using to validate the input types I need. 1) Input Type - ID Rules * must start with a letter or number * can contain only letters, numbers, -, ., _, * be between 4 and 15 characters. Should Pass * j.smith_33- Should Fail * aa * jsmith1234567890 * -abc12 Implementation var allowedLength = inputToTest.length >= 4 && inputToTest.length <= 15 ? true : false; if(/^[A-Za-z0-9-_.]+$/.test(inputToTest) && /^[A-Za-z]/.test(inputToTest) && allowedLength){ //passed validation} 2) Input Type - Password * Passwords must be 6-32 characters. * At least one number must be included. Should Pass * abc1-. Should Fail * aabb * bbbcccd * 1234567890ASDFGHJKLQWERTYUIOPZXCV Implementation var allowedLength = inputToTest.length >= 6 && inputToTest.length <= 32 ? true : false; if(/^[A-Za-z0-9-_.]/.test(inputToTest) && /d/.test(inputToTest) && allowedLength){ //passed validation} Any thoughts on trying to combine any of these? In particular would be adding the length requirement to one of these existing regexs. I've tried with playing around with the placement of {4,15} and {6,32} respectively with no luck.
  3. alzami

    complex form

    i have posted my calculator codes in my previous posts.i have made a equation solver .which gives me solution of a quadratic equation if the roots are only real number.if the roots are in complex form or complex root it gives me NAN.how it can be manipulated to show complex roots like (5+3i)?? function solve(){ var m=document.getElementById("divs");m.style.display="none"; var q=document.getElementById("gets"); var a=prompt("put coeff of x^2"); var b=prompt("put coeff of x"); var c=prompt("put value of c"); var p=(b*b-4*a*c); var nom=Math.sqrt(p); var de_nom=2*a; var x1=(-b+nom)/de_nom; var x2=(-b-nom)/de_nom; q.value="x1 ="+ x1 +","+ " x2 ="+ x2 ;} for convinience i am posting the whole code here... <!doctype html><html><head><meta charset="utf-8"><title>Untitled Document</title><style>.its{ width:32%; font-size:20px; color:blue; margin:0 auto; }#gets{ width:289px; height:50px; font-size:20px; color:black; background-color:white; }#divs{ width:289px;height:50px;font-size:10px;color:black;background-color:white;display:none;position:absolute;top:13px;left:10px;border:1px solid black;}</style></head><body style="position:relative;"><div id="divs"><a href="#" onClick="solve();"><b>ax^2+bx+c=0</b></a></br><a href="#" onClick=><b>ax^3+bx^2+cx+d=0</b></a></div><form style="background-color:grey;display:inline-block;height:350px;width:300px;padding:10px;"><input type="text" id="gets" value="calculator(press CLR to begin)"></br><input type="button" value="0" onClick="calc(this.value);" class="its"><input type="button" value="1" onClick="calc(this.value);" class="its" ><input type="button" value="+" onClick="calc(this.value);" class="its"> <input type="button" value="2" onClick="calc(this.value);" class="its"><input type="button" value="3" onClick="calc(this.value);" class="its"><input type="button" value="-" onClick="calc(this.value);" class="its"><input type="button" value="4" onClick="calc(this.value);" class="its"><input type="button" value="5" onClick="calc(this.value);" class="its"><input type="button" value="÷ " onClick="calc(this.value);" class="its" ><input type="button" value="6" onClick="calc(this.value);" class="its"><input type="button" value="7" onClick="calc(this.value);" class="its"><input type="button" value=" ✕" onClick="calc(this.value);" class="its"><input type="button" value="8" onClick="calc(this.value);" class="its"><input type="button" value="9" onClick="calc(this.value);" class="its" ><input type="button" value="=" onClick="ev('gets');" class="its"><input type="button" value="sqrt" onClick="sqr('gets');" class="its" ><input type="button" value="%" onClick="calc(this.value);" class="its"><input type="button" value="CLR" onClick="clr('gets');"class="its" ><input type="button" value="ln" onClick="lnit('gets');" class="its" ><input type="button" value="sin" onClick="trig('gets',Math.sin);" class="its" ><input type="button" value="tan" onClick="trig('gets',Math.tan);" class="its"><input type="button" value="cos" onClick="trig('gets',Math.cos);"class="its" ><input type="button" value="cosec(x)" onClick="rev_trig('gets',Math.sin);" class="its" ><input type="button" value="cot(x)" onClick="rev_trig('gets',Math.tan);" class="its"><input type="button" value="sec(x)" onClick="rev_trig('gets',Math.cos);"class="its" ><input type="button" value="x^(y)" onClick="power('gets');"class="its" ><input type="button" value="log2" onClick="log2('gets');"class="its" ><input type="button" value="log10" onClick="log10('gets');"class="its" ><input type="button" value="solve" onClick="solve_show('divs');"class="its" ><input type="button" value="X" onClick="calc(this.value);"class="its" ></form><script>var i=0;var t=300;function calc(i){document.getElementById("gets").value +=i; }function ev(el){var c=eval(document.getElementById("gets").value); document.getElementById("gets").value=c;}function clr(el){ var m=document.getElementById(el); var c=document.getElementById("divs"); c.style.display="none"; m.value="";}function sqr(el){var c=document.getElementById(el);var v=Math.sqrt(c.value);c.value=v;}function lnit(el){ var c=document.getElementById(el); var v=Math.log(c.value); c.value=v;}function trig(el,oprtr){ var m=document.getElementById(el); var p=(m.value)*( Math.PI/180); var v=oprtr(p); m.value=v;}function power(el){ var m=document.getElementById(el); var v=prompt("put power : "); var p=Math.pow(m.value,v); m.value=p;}function log2(el){ var m=document.getElementById(el); var p=Math.log(m.value)/Math.LN2; m.value=p;}function log10(el){ var m=document.getElementById(el); var p=Math.log(m.value)/Math.LN10; m.value=p;} function rev_trig(el,oprtr){ var m=document.getElementById(el); var p=(m.value)*( Math.PI/180); var d=oprtr(p); var g=1/d; m.value=g;}function solve_show(el){ var m=document.getElementById(el); m.style.display="block";}function solve(){ var m=document.getElementById("divs");m.style.display="none"; var q=document.getElementById("gets"); var a=prompt("put coeff of x^2"); var b=prompt("put coeff of x"); var c=prompt("put value of c"); var p=(b*b-4*a*c); var nom=Math.sqrt(p); var de_nom=2*a; var x1=(-b+nom)/de_nom; var x2=(-b-nom)/de_nom; q.value="x1 ="+ x1 +","+ " x2 ="+ x2 ;}</script></body></html>
  4. in my previous post i posted a problem about my javascript calculator .in my calculator in made a log button which base is 10;it shows a perfect integer result.say it gives accurately 2 if i want to find the log of 100.but if i want log of 104 it doesn't work;how can i solve that function log10(el){ var m=document.getElementById(el); for(;{ var d=Math.pow(10,i); if(d==m.value){ m.value=i; i=0; break; } i++; }}
  5. Hi, I have a button on my page and it links to a page that has a security notice on it, for the user to login the user has to agree that they've read this and then they click on the login in process. Is it possible if the user has read this previously(using cookies) that they are brought to the login page without showing the security page?The process is as follows:1. User clicks login.2. Depending on if the user has clicked "I have read this" the user will be brought to the login page..... if they have not read the message before then they will be brought to the security page.Hope this makes sense.Please any help would be greatly appreciated?ThanksDavid
  6. i have made a calculator.where i want to put sin, cos and tan button .and thats not the problem.i want a single function to emplement sin ,tan ,cos without creating three different function. whole code is here... <!doctype html><html><head><meta charset="utf-8"><title>Untitled Document</title><style>.its{ width:32%; font-size:20px; color:blue; margin:0 auto; }#gets{ width:289px; height:50px; font-size:20px; color:red;}</style></head><body><form style="background-color:grey;display:inline-block;height:290px;width:300px;padding:10px;"><input type="text" id="gets" value="calculator(press CLR to begin)"></br><input type="button" value="0" onClick="calc(this.value);" class="its"><input type="button" value="1" onClick="calc(this.value);" class="its" ><input type="button" value="+" onClick="calc(this.value);" class="its"> <input type="button" value="2" onClick="calc(this.value);" class="its"><input type="button" value="3" onClick="calc(this.value);" class="its"><input type="button" value="-" onClick="calc(this.value);" class="its"><input type="button" value="4" onClick="calc(this.value);" class="its"><input type="button" value="5" onClick="calc(this.value);" class="its"><input type="button" value="/" onClick="calc(this.value);" class="its" ><input type="button" value="6" onClick="calc(this.value);" class="its"><input type="button" value="7" onClick="calc(this.value);" class="its"><input type="button" value="*" onClick="calc(this.value);" class="its"><input type="button" value="8" onClick="calc(this.value);" class="its"><input type="button" value="9" onClick="calc(this.value);" class="its" ><input type="button" value="=" onClick="ev('gets');" class="its"><input type="button" value="sqrt" onClick="sqr('gets');" class="its" ><input type="button" value="%" onClick="calc(this.value);" class="its"><input type="button" value="CLR" onClick="clr('gets');"class="its" ><input type="button" value="log" onClick="logit('gets');" class="its" ><input type="button" value="sin" onClick="trig('gets',sin);" class="its" ><input type="button" value="tan" onClick="trig('gets',tan);" class="its"><input type="button" value="cos" onClick="trig('gets',cos);"class="its" ></form><script>function calc(i){document.getElementById("gets").value +=i; }function ev(el){var c=eval(document.getElementById("gets").value); document.getElementById("gets").value=c;}function clr(el){ var m=document.getElementById(el); m.value="";}function sqr(el){var c=document.getElementById(el);var v=Math.sqrt(c.value);c.value=v;}function logit(el){ var c=document.getElementById(el); var v=Math.log(c.value); c.value=v;}function trig(el,oprtr){ var m=document.getElementById(el); var v=Math.oprtr(m.value); m.value=v;}</script></body></html> for convenience i am giving the codes for sin cos and tan seperately ... <input type="button" value="sin" onClick="trig('gets',sin);" class="its" ><input type="button" value="tan" onClick="trig('gets',tan);" class="its"><input type="button" value="cos" onClick="trig('gets',cos);"class="its" > i want those three executed using only one function.anyone explain to me why this doesn't work?and the script is ... function trig(el,oprtr){ var m=document.getElementById(el); var v=Math.oprtr(m.value); m.value=v;}
  7. the "+" sign is not adding in the div with others.why this happens.other numbers works fine but symbols don't acting like them <!doctype html><html><head><meta charset="utf-8"><title>Untitled Document</title><style>#inpts{ width:50px; height:50px; border:1px solid black; }</style></head><body><div id="inpts"></div><input type="button" value=" 1 " onClick="gets('inpts',1);"><input type="button" value=" 2 " onClick="gets('inpts',2);"><input type="button" value=" + " onClick="gets('inpts',+);"><input type="button" value=" = " onClick="gets('inpts',=);"><script>function gets(el,n){var m=document.getElementById(el);m.innerHTML += n; }</script></body></html>
  8. trying to make a game here.everyon know what this game is.filling couple of boxes .if can manage to put similar object in a row that player will win.i can manage to make the structure.but cant figure out how to declare winner i mean how can i decide that three table in a row is filled by same object?and if i click on a table a certain object appears for player one.but if player 2 click on the same table it changes.how to prevent that?you will understand what i am trying to say if you see my codes.... <!doctype html><html><head><meta charset="utf-8"><title>Untitled Document</title><style>#shape{ border:1px solid black; width:200px; height:200px;}td{ border:1px solid black;}</style></head><body><table id="shape"><tr ><td onClick="add(this.id);" id="td1"></td><td onClick="add(this.id);" id="td2"></td><td onClick="add(this.id);" id="td3" ></td></tr><tr ><td onClick="add(this.id);" id="td4" ></td><td onClick="add(this.id);" id="td5"></td><td onClick="add(this.id);" id="td6"></td></tr><tr ><td onClick="add(this.id);" id="td7" ></td><td onClick="add(this.id);" id="td8"></td><td onClick="add(this.id);" id="td9"></td></tr></table><script>var i=0;function add(el){ var m=document.getElementById(el); i++; if(i%2==1){ m.innerHTML="o"; } if(i%2==0){ m.innerHTML="x"; }}</script></body></html>
  9. i want to show a div onClick over a button.and stay there a for a little moment then disappear again.codes seems fine but not working... <!doctype html><html><head><meta charset="utf-8"><title>Untitled Document</title><style>#it{ width:250px; height:100px; background-color:green; border-radius:5px; display:none;}</style></head><body><input type="button" value=" click to view " onClick="show('it');"><div id="it"></div><script>var i=0;function show(el){ var m=document.getElementById(el); m.style.display="block"; var s=its_prop(); if(s){ m.style.display="none";}}function its_prop(){ var d=document.getElementById("it"); d.style.display="block"; i++; if(i==10){ clearTimeout(p); i=0; return true; } else{ var p=setTimeout(its_prop,100); } } </script></body></html>
  10. title will be "check a fucntion executed or not!" say i have a html element... <a onClick="show();" >some text</a> after i clecked on the link the function show( ) will be executed. function show(){---------------------------;_________________;} in my script tag i have a if condition which i want to execute depending on show() is executed or not.if show() is executed if statement will execute and if not if will not be executed.how can i test that is it correct???i think not!!! <script>if(show()){ ---------------------------;------------------------------;}
  11. don't know why the sliding effect starts with a real slow speed but after one loop it gains the expected speed .can't find out whats the problem is <!doctype html><html><head><meta charset="utf-8"><title>Untitled Document</title><style>*{margin:0px; padding:0px;}#box{ width:700px; height:301px; border:1px solid black; position:relative; overflow:hidden;}img{ width:700px; height:300px;}#i1{ height:300px; width:700px; position:absolute; left:0px; top:0px;}#i2{ position:absolute; height:300px; width:700px; left:700px; top:0px;}#i3{ height:300px; width:700px; position:absolute; top:0px; left:1400px;}</style></head><body><div id="box"><div id="i1"><img src="imagec1.jpg" ></div><div id="i2"><img src="imagec2.jpg" ></div><div id="i3"><img src="imagec3.jpg" ></div></div><script>var m=0;var n=700;var o=1400;function scroll(){ document.getElementById("i1").style.left = m +"px"; document.getElementById("i2").style.left = n +"px"; document.getElementById("i3").style.left = o +"px"; m=m-1;n=n-1;o=o-1; if(m==-1400){m=700;} if(n==-700){n=1400;} if(o==-700){o=1400;}}setInterval(scroll,10);</script><script>window.onload=scroll();</script></body></html>
  12. i have a created an auto image slide gallery which i want to stop whenever i click on the "close auto " button.but cant figure out how to.so please help me out on this!!i've deleated the "next" and "previous" sections of javascript for simplification because that part works just fine. <!doctype html><html><head><meta charset="utf-8"><title>Untitled Document</title><style>#this{ width:500px; height:100px; border:1px solid blue; display:none;}#this img{ width:100px; height:100px;}#that { width:300px;height:300px; position:absolute;top:120px; left:200px;border:1px solid black;}#that img{ width:300px;height:300px;} a:hover{ color:red; }</style></head><body style="position:relative;"><div id="this"></div><div style="height:30px;width:100px;background-color:grey;float:left;position:absolute;top:0px;left:510px;" id="next"><a href="#" onClick="show();">next</a></div><div style="height:30px;width:100px;background-color:grey;float:right;position:absolute;top:0px;left:0px;" id="previous"><a href="#" onClick="showBack();">previous</a></div><div style="height:30px;width:100px;background-color:grey;float:left;position:absolute;top:0px;left:600px;" id="auto"><a href="#" onClick="auto();">auto</a></div><div style="height:30px;width:100px;background-color:grey;float:left;position:absolute;top:50px;left:600px;" id="auto"><a href="#" onClick="close();">closeAuto</a></div><div id="that"><img src="image1.jpg" /></div><script>var i; var imag = ["image1.jpg","image2.jpg","image3.jpg","image4.jpg","image5.jpg"]function load(){ var m=document.getElementById("this"); for(i=0;i<imag.length;i++){ m.innerHTML += '<img src="'+imag[i]+'" id="'+i+'" />'; } } </script><script>load();</script><script>a=0;function auto(){ var m=document.getElementById("that"); a++; if(a==imag.length){ m.innerHTML='<img src="'+imag[0]+'" />'; a=0; }else{ m.innerHTML='<img src="'+imag[a]+'" />'; } var c=setTimeout(auto,700); }</script><script>function close(){ clearTimeout(c); var m=document.getElementById("that"); m.innerHTML='<img src="'+imag[a]+'" />';}</script></body></html>
  13. I am trying to access JavaScript function player1() from asp button's onclick event, but it throws error 'player1' is not a member of 'ASP.jsvideo2design_aspx'. following is my aspx code <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="jsvideo2design.aspx.vb" Inherits="jsvideoplayer2.jsvideo2design" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"><script type="text/javascript"> <title> video player </title>function player1(e){var vid=document.getElementById("video1");var play1=document.getElementById("play");if (vid.paused) { vid.play(); button.textContent = "||"; } else { vid.pause(); button.textContent = ">"; } } </script></head><body> <form id="form1" runat="server"> <div> <video id="video1"> <source src="videos/IMALAB_OpeningCeremony_v1.webm" type="video/webm" /> </video> <asp:Button ID="button1" runat="server" onclick="player1(event)" /> </div> </form></body></html>
  14. I'm making a chat website for some friends and I've tried multiple types of registration pages but, i can't figure it out. Please Help. This is what I have so far: <div id="body contents"> <div align="center" id="form_holder"> <form id="form_placement"> Username:<input type="text" id="UN" name="UN" autocomplete="on" runat="server" /> <br/> Password:<input type="password" id="PW1" autocomplete="off" runat="server" name="PW1" /> <br/> Confirm:<input type="password" id="PW2" autocomplete="off" runat="server" name="PW2" /> <br/> <input type="button" runat="server" id="submit_form" name="form_submition" onclick="saveFile()" value="Submit" /> </form> </div> <h6 id="results" runat="server"></h6> </div> <div id="script contents"> <script type="text/javascript"> function saveFile() { var userid; userid=document.getElementById('UN'); var passid; passid=document.getElementById('PW1'); var confirmid; confirmid=document.getElementById('PW2'); if (passid.name == confirmid.name) { document.getElementById('reults').innerHTML= "File save as "+ userid +" and "+ passid +"."; alert('Saved file succesfully.') if (userid.name === 0) { fopen('users.txt').mkdir(userid.name ++ passid.name); fclose() } } else { alert('Sorry Username or Password is taken, or is incorrect.'); } } </script> Any suggestions?
  15. i want to load some images using new image() object method.i can do the same thing using normal array indexing.but i want to do it in this way only for learning purpose.can anyone tell me where the mistakes here <!doctype html><html><head><meta charset="utf-8"><title>Untitled Document</title><style>#this{ width:500px; height:100px; border:1px solid blue;}#this img{ width:100px; height:100px;}</style></head><body><div id="this"></div><script>load();</script><script> var imag = new array(4); imag[0] = new image(); imag[0].src = "image1.jpg"; imag[1] = new image(); imag[1].src = "image2.jpg"; imag[2] = new image(); imag[2].src="image3.jpg"; imag[3] = new image(); imag[3].src ="image4.jpg"; imag[4] =new image(); imag[4].src="image5.jpg";function load(){ var m=document.getElementById("this"); var i; for(i=0;i<imag.length;i++){ m.innerHTML += '<img src="'+imag[i].src+'" id="'+i+'" onClick="show(this.id);" />'; }} </script></body></html>
  16. i want to make a smooth scroll upto a certain direction.but code doesn't working though i cant see any error or any other problem.please help <!doctype html><html><head><meta charset="utf-8"><title>Untitled Document</title><style>.this{ width:200px; height:1000px; border:1px solid black;}</style></head><body><a href="#" onClick="return false;" onMouseDown="scroll('div1');">click to div1</a></br><a href="#" onClick="return false;" onMouseDown="scroll('div2');">click to div2</a></br><a href="#" onClick="return false;" onMouseDown="scroll('div3');">click to div3</a></br><a href="#" onClick="return false;" onMouseDown="scroll('div4');">click to div4</a></br><div class="this" id="div1">div1</div><a href="#" onClick="return false;" onMouseDown="toTop();">back to top</a><div class="this" id="div2" >div2</div><a href="#" onClick="return false;" onMouseDown="toTop();">back to top</a><div class="this"id="div3" >div3</div><a href="#" onClick="return false;" onMouseDown="toTop();">back to top</a><div class="this" id="div4" >div4</div><a href="#" onClick="return false;" onMouseDown="toTop();">back to top</a><script>function scroll(el){ var m=document.getElementById(el); var t=m.offsetTop; var c=window.pageYOffset; window.scrollBy(0,40); if(c==t){ clearTimeout(p); } var p=setTimeout(scrolll,50); }</script><script>function toTop(){ var m=window.pageYOffset; window.scrollBy(0,-m);}</script></body></html> i have tried this also .but not working <script>var i=0;function scroll(el){ var m=document.getElementById(el); var t=m.offsetTop; var c=window.pageYOffset; for(i=0;i<=m.offsetTop;i++){ window.scrollBy(0,i); } }</script>
  17. want to make the small div to move with the page while it is being scrolled.seems codes not working .please help me on this. <!doctype html><html><head><meta charset="utf-8"><title>Untitled Document</title><style>.mid{ height:2900px; width:400px; border:1px solid black; margin:0 auto;}#od{ float:left; height:300px; width:150px; border:1px solid red; margin-left:143px; top:20px; position:relative;}</style><script>window.onscroll=function(){setTimeout(movediv,300);}</script></head><body style="position:relative;"><div id="od"></div><div class="mid"></div><script>function movediv(){ var this_id=document.getElementById("od"); var heights=this_id.style.height; var heights_num=heights.slice(0,-1); var h=parseInt( heights_num); var page_height=parseInt(window.pageYOffset); if(page_height>h){ move(); }}function move(){ var m=document.getElementById("od"); var tops=m.style.top; var d=parseInt(window.pageYOffset); var ts=tops.slice(0,-1); var t=parseInt(ts); t++; m.style.top = t +"px"; var p = setTimeout(move,12); if(t>d+60){ clearTimeout(p); m.style.top = t +"px"; } }</script></body></html>
  18. can i call .ascx page like this ? lbl.Attributes.Add("onclick", "divpopuptrial.ascx?asbcd1=" & lbl.Text & ";document.getElementById('divpopuptrial1').style.display='block' ")
  19. asp page design view is not showing gridview on design page. I am working on a asp project. one of the asp page is not showing it's design view completely but it showing it's source view and code is running fine.actually gridview is not showing in design view. please help me to fix it. following is my code please go through it <%@ Page Language="VB" AutoEventWireup="false" CodeFile="inassembly.aspx.vb" Inherits="inassembly" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <link rel="shortcut icon" type="image/x-icon" href="Images/favicon.ico" /> <link id="Link1" runat="server" rel="icon" href="Images/favicon.ico" type="image/ico" /> <script type="text/javascript"> function openwindow() { window.showModalDialog('popup.aspx', '', 'width=500,height=500,status=0,toolbar=0,menubar=no') } </script> <style type="text/css"> .CSSTableGenerator { margin:0px;padding:0px; width:100%; box-shadow: 10px 10px 5px #888888; border:1px solid #000000; -moz-border-radius-bottomleft:0px; -webkit-border-bottom-left-radius:0px; border-bottom-left-radius:0px; -moz-border-radius-bottomright:0px; -webkit-border-bottom-right-radius:0px; border-bottom-right-radius:0px; -moz-border-radius-topright:0px; -webkit-border-top-right-radius:0px; border-top-right-radius:0px; -moz-border-radius-topleft:0px; -webkit-border-top-left-radius:0px; border-top-left-radius:0px;}.CSSTableGenerator table{ width:100%; height:100%; margin:0px;padding:0px;}.CSSTableGenerator tr:last-child td:last-child { -moz-border-radius-bottomright:0px; -webkit-border-bottom-right-radius:0px; border-bottom-right-radius:0px;}.CSSTableGenerator table tr:first-child td:first-child { -moz-border-radius-topleft:0px; -webkit-border-top-left-radius:0px; border-top-left-radius:0px;}.CSSTableGenerator table tr:first-child td:last-child { -moz-border-radius-topright:0px; -webkit-border-top-right-radius:0px; border-top-right-radius:0px;}.CSSTableGenerator tr:last-child td:first-child{ -moz-border-radius-bottomleft:0px; -webkit-border-bottom-left-radius:0px; border-bottom-left-radius:0px;}.CSSTableGenerator tr:hover td{ }.CSSTableGenerator tr:nth-child(odd){ background-color:#aad4ff; }.CSSTableGenerator tr:nth-child(even){ background-color:#ffffff; }.CSSTableGenerator td{ vertical-align:middle; border:1px solid #000000; border-width:0px 1px 1px 0px; text-align:left; padding:7px; font-size:10px; font-family:Arial; font-weight:normal; }.CSSTableGenerator tr:last-child td{ border-width:0px 1px 0px 0px;}.CSSTableGenerator tr td:last-child{ border-width:0px 0px 1px 0px;}.CSSTableGenerator tr:last-child td:last-child{ border-width:0px 0px 0px 0px;}.CSSTableGenerator tr:first-child td{ background:-o-linear-gradient(bottom, #005fbf 5%, #003f7f 100%); background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #005fbf), color-stop(1, #003f7f) ); background:-moz-linear-gradient( center top, #005fbf 5%, #003f7f 100% ); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#005fbf", endColorstr="#003f7f"); background: -o-linear-gradient(top,#005fbf,003f7f); background-color:#005fbf; border:0px solid #000000; text-align:center; border-width:0px 0px 1px 1px; font-size:14px; font-family:Arial; font-weight:bold; color:#ffffff;}.CSSTableGenerator tr:first-child:hover td{ background:-o-linear-gradient(bottom, #005fbf 5%, #003f7f 100%); background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #005fbf), color-stop(1, #003f7f) ); background:-moz-linear-gradient( center top, #005fbf 5%, #003f7f 100% ); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#005fbf", endColorstr="#003f7f"); background: -o-linear-gradient(top,#005fbf,003f7f); background-color:#005fbf;}.cssnew{ filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#005fbf", endColorstr="#003f7f"); background: -o-linear-gradient(top,#005fbf,003f7f);} .CSSTableGenerator tr:first-child td:first-child{ border-width:0px 0px 1px 0px;}.CSSTableGenerator tr:first-child td:last-child{ border-width:0px 0px 1px 1px;}</style> <style type="text/css" >.body1 {background-repeat: no-repeat;width:100%; }</style><style type="text/css" >.blurring {opacity:0.4;filter:alpha(opacity=40); }</style><title> Assembly Dash Board</title> </head> <body id="blurbody" runat="server" style="height: 201px; background-image:url('Images/bluelast.jpeg') ; overflow:hidden " > <form id="form1" runat="server"> <div class="body1" id="dvmain1" runat="server"> <table> <tr> <td width="120" height="30" valign="top"> <img src="Images/imapglogo3.bmp" alt="" /> </td> <td align="center" valign="top" width="70%" > <%--<img src="Images/titleimg.bmp" alt="" />--%> <asp:Label ID="label4" runat ="server" Text ="Assembly Dash Board" ForeColor="DarkRed" Font-Size="Larger" Font-Names="arial" Font-Bold="true" ></asp:Label> </td> <td align="center" style="width:100px; width:"20%"> <asp:ImageButton ID="button2" runat="server" ImageUrl="Images/backred2.gif" /> <%--<asp:Button ID="button2" runat="server" Text="Back" BackColor="BurlyWood" />--%> </td> <td align="left" style="width:100px;"> <%--<asp:Button ID ="button3" runat="server" Text="Layouts" BackColor="BurlyWood" BorderStyle="Outset" />--%> <asp:ImageButton ID="button3" ToolTip="click to view Layouts" runat="server" ImageUrl="Images/images24revised.JPG" /> </td> </tr> </table> <table> <tr > <td align="left" nowrap="nowrap"> <asp:Label ForeColor="White" Font-Size="small" ID ="label5" runat ="server" Text ="Cost Center :" Font-Bold="true" ></asp:Label> </td> <td align="left" nowrap="nowrap" colspan="5" style="width:300px;" > <asp:Label ForeColor="White" Font-Size="small" ID="label6" runat ="server" align="left" Text ="text"></asp:Label> </td> <td align="center" style="width:200px;"> <%--blank--%> </td> <td align="center" style="width:100px;"> <%--blank--%> </td> <td align="left" style="width:200px;" > <asp:label Font-Size="small" ForeColor="white" ID="label11" runat="server" Font-Bold ="true" Text="Pending(%)"></asp:label> </td> <td align="left" style="width:200px;"> <asp:Label Font-Size="small" ForeColor="White" ID="label16" runat ="server" Font-Bold ="true" Text="Total Number"></asp:Label> </td> <td align="left" style="width:100px;"> <asp:Label Font-Size="small" ForeColor="White" ID="label1" runat ="server" Font-Bold ="true" Text="Completed"></asp:Label> </td> <td align="center" style="width:100px;"> <%--blank--%> </td> </tr><tr > <td align="left" style="width:100px;"> <asp:Label Font-Size="small" ForeColor="white" ID="label14" runat ="server" Font-Bold ="true" Text="Location :"></asp:Label> </td> <td colspan="5" align="left" style="width:200px;"> <asp:Label Font-Size="small" ForeColor="white" ID="label10" runat="server" Text="text"></asp:Label> </td> <td align="center" style="width:100px;"> <%--blank--%> </td> <td align="center" style="width:100px;"> <asp:Label Font-Size="small" ForeColor="white" id="label7" runat ="server" Text ="Assemblies" Font-Bold="true" ></asp:Label> </td> <td align="center" style="width:100px;"> <asp:Label Font-Size="small" ForeColor="white" ID="label12" runat="server" Text="value"></asp:Label> </td> <td align="center" style="width:100px;"> <asp:Label Font-Size="small" ForeColor="White" ID="label17" runat ="server" Text="value"></asp:Label> </td> <td align="center" style="width:100px;"> <asp:Label Font-Size="small" ForeColor="white" ID="label2" runat ="server" Text="value"></asp:Label> </td> <td align="center" style="width:100px;"> <%--blank--%> </td> <td align="center" style="width:100px;"> <%--blank--%> </td></tr><tr> <td align="left" style="width:100px;"> <asp:Label Font-Size="small" ForeColor="white" id="label19" runat ="server" Font-Bold ="true" Text="Engineer :"></asp:Label> </td> <td colspan="4" align="left" style="width:200px;"> <asp:Label Font-Size="small" ForeColor="white" ID="label15" runat="server" Text="text"></asp:Label> </td> <td align="center" style="width:100px;"> <%--blank--%> </td> <td align="center" style="width:100px;"> <%--blank--%> </td> <td align="center" style="width:100px;"> <asp:Label Font-Size="small" ForeColor ="white" ID="label8" runat="server" Text="Items" Font-Bold ="true" ></asp:Label> </td> <td align="center" style="width:100px;"> <asp:Label Font-Size="small" ForeColor="white" ID="label13" runat="server" Text="value"></asp:Label> </td> <td align="center" style="width:100px;"> <asp:Label Font-Size="small" ForeColor="white" ID="label18" runat ="server" Text="value"></asp:Label> </td> <td align="center" style="width:100px;"> <asp:Label Font-Size="small" ForeColor="white" ID="label3" runat ="server" Text="value"></asp:Label> </td> <td align="center" style="width:100px;"> <%--blank--%> </td> <td align="center" style="width:100px;"> <%--blank--%> </td></tr><tr> <td align="left" nowrap="nowrap"> <asp:Label Font-Size="small" ForeColor="white" id="label21" runat ="server" Font-Bold ="true" Text="Delivery Date :"></asp:Label> </td> <td nowrap="nowrap" colspan="2" align="left" style="width:100px;"> <asp:Label Font-Size="small" ForeColor="white" id="label20" runat ="server" Text="text"></asp:Label> </td> <td align="center" style="width:200px;"> </td> <td align="left" style="width:100px;"> </td> <%--value of completed--%> <td align="center" style="width:100px;"> <%--blank--%> </td> <td align="center" style="width:100px;"> <%--blank--%> </td> <td align="center" style="width:100px;"> <%--blank--%> </td> <td align="center" style="width:100px;"> <%--blank--%> </td> </tr><%--<tr> <td align="left" style="width:100px;"> <asp:Label ForeColor="#8C001A" id="label22" runat ="server" Text=""></asp:Label> </td> <td align="center" style="width:200px;"> </td> <td align="left" style="width:100px;"> </td> <td align="center" style="width:100px;"> </td> <td align="center" style="width:100px;"> </td> <td align="center" style="width:100px;"> </td> <td align="center" style="width:100px;"> </td> <td align="center" style="width:100px;"> </td> <td align="center" style="width:100px;"> </td> <td align="center" style="width:100px;"> </td> <td align="center" style="width:100px;"> </td> </tr>--%> </table> </div> <table width="100%"> <tr><td><div class="CSSTableGenerator" style="float: left; width:100%; "> <table id="Table1" runat="server" cellpadding="1" border="1" style="background-color: #FFFFFF; border-color: #999999; border-style: none; border-width: 1px; width: 100%; "> <tr> <td align="center" style="width:08%;"> <font color="#dddddd" size="01px" > Assembly </font> </td> <td align="center" style="width:14%;" > <font color="#dddddd" size="01px"> AssemblyName </font> </td> <td align="center" style="width:07%;"> <font color="#dddddd" size="01px"> Source </font> </td> <td align="center" style="width:14%;"> <font color="#dddddd" size="01px"> Operator </font> </td> <td style="width:04%;" > <font color="#dddddd" size="01px"> Hours </font> </td> <td style="width:03%;"> <font color="#dddddd" size="01px"> Start Date </font> </td> <td style="width:04%;"> <font color="#dddddd" size="01px"> End Date </font> </td> <td align="center" style="width:22%;"> <font color="#dddddd" size="01px"> Operators </font> </td> <td style="width:03%;"> <font color="#dddddd" size="01px"> Hours </font> </td> <td style="width:03%;" > <font color="#dddddd" size="01px"> Start Date </font> </td> <td style="width:03%;"> <font color="#dddddd" size="01px"> End Date </font> </td> <td style="width:03%;" > <font color="#dddddd" size="01px"> Shortfall </font> </td> <td style="width:03%;"> <font color="#dddddd" size="01px"> Rack </font> </td> <td align="center" style="width:07%;"> <font color="#dddddd" size="01px"> Remark </font> </td> </tr> </table> </div></td></tr> <tr><td > <div class="CSSTableGenerator"id="div1"style="height:460px; overflow:scroll " > <asp:GridView ID="GridView2" style="table-layout:fixed;" Width="100%" AutoGenerateColumns ="False" AllowSorting="true" runat="server" CellPadding="4" ForeColor="#333333" GridLines="both" > <AlternatingRowStyle BackColor="#aad4ff" /> <Columns> <asp:TemplateField HeaderText="" HeaderStyle-Font-Size="Small" > <ItemTemplate > <asp:label ID="label23" Font-Size="small" ToolTip ="click to see assembly page" runat="server" Text='<%# bind("AsbCd") %>' > </asp:label> </ItemTemplate> <HeaderStyle BorderStyle="Outset" Width="90px" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="center" /> </asp:TemplateField> <asp:TemplateField HeaderText="" HeaderStyle-Font-Size="small" > <ItemTemplate> <asp:label ID="label24" Font-Size="Small" ToolTip ="click to see assembly page" runat="server" Text='<%# bind("AsbNm") %>' > </asp:label> </ItemTemplate> <HeaderStyle BorderStyle="Outset" Width="90px" /> <ItemStyle BorderStyle="Outset" HorizontalAlign="Left" /> </asp:TemplateField> <asp:BoundField HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="left" /> </asp:BoundField> <asp:BoundField HeaderText="" DataField="operators" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="left" /> </asp:BoundField> <asp:BoundField HeaderText="" DataField="Days" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right"/> </asp:BoundField> <asp:BoundField DataField="PlannedDt" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" DataFormatString="{0: dd- MMM- yyyy}" HtmlEncode="false" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right" /> </asp:BoundField> <asp:BoundField DataField="PlancedEnddt" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" DataFormatString="{0: dd- MMM- yyyy}" HtmlEncode="false" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right" /> </asp:BoundField> <asp:BoundField DataField="Operator" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="left" /> </asp:BoundField> <asp:BoundField DataField="ActualDays" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right" /> </asp:BoundField> <asp:BoundField DataField="ActualStartDt" HeaderText=" " ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" DataFormatString="{0:dd-MMM-yyyy}" HtmlEncode="false" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right" /> </asp:BoundField> <asp:BoundField DataField="ActualEndDt" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell " DataFormatString="{0:dd-MMM-yyyy}" HtmlEncode="false" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right" /> </asp:BoundField> <asp:BoundField DataField="IssuePending" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell " > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right" /> </asp:BoundField> <asp:BoundField DataField="rack" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-size="Small" HeaderStyle-CssClass="fixedheadercell" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right" /> </asp:BoundField> <asp:BoundField DataField="Remark" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Center" /> </asp:BoundField> </Columns> </asp:GridView> </div> </td> </tr> </table> </form> </body></html> please fix it.
  20. Hi guys and gals. I need some expertise knowledge and understanding with converting my Microsoft Worded CV to be viewed primarily in IE. Due to employers requiring CV to be emailed these days. I have found that when they print my CV off the page settings have printed the text all over the place. So far I have converted things exactly as it looked in word but much better. I have a few problems to complete it as I would like. Firstly, I tried to add a message box to come up on load. The problem the security content in IE browser blocks the Java script. I am sure any prospective employer would not risk trying to open it and would be deleted without viewing. Everything works in Firefox but not in IE. I need IE to be default browser as it is installed on machines generally, so this makes sense. Secondly, I am 45 years old and my CV is getting quite long but to keep within 2 pages is impossible to include everything. As seen on Facebook some posts have a "read more" or show more" text. I would like my CV work history to work in the same way. So only a few lines show on load of each job. Having the option to click or hover to continue reading the job detail, to enable me to include much more detail without over facing them. Lastly, and more importantly I am very new to HTML, CSS, PP and Java script. Can it all be done? I have loaded my code in this attachment option not sure how it works but just in case it helps. Not sure why some of my previous employer names are not lining up properly as the others, so annoying!! Thanks for taking the time to read me!! Online help w3.html
  21. I have developed gridview in asp.net. gridview is showing in Internet Explorer (IE) but not in mozilla firefox,chrome. please sort out my problem Following is my gridview code <asp:GridView ID="GridView2" style="table-layout:fixed;" Width="100%" AutoGenerateColumns ="False" AllowSorting="true" runat="server" CellPadding="4" ForeColor="#333333" GridLines="Both"> <AlternatingRowStyle BackColor="#DCDCDC"/> <Columns> <asp:TemplateField HeaderText="" HeaderStyle-Font-Size="Small" > <ItemTemplate > <asp:label ID="label23" Font-Size="small" ToolTip ="click to see assembly page" runat="server" Text='<%# bind("AsbCd") %>' > </asp:label> </ItemTemplate> <HeaderStyle BorderStyle="Outset" Width="90px" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="center" /> </asp:TemplateField> <asp:TemplateField HeaderText="" HeaderStyle-Font-Size="small" > <ItemTemplate> <asp:label ID="label24" Font-Size="Small" ToolTip ="click to see assembly page" runat="server" Text='<%# bind("AsbNm") %>' > </asp:label> </ItemTemplate> <HeaderStyle BorderStyle="Outset" Width="90px" /> <ItemStyle BorderStyle="Outset" HorizontalAlign="Left" /> </asp:TemplateField> <asp:BoundField HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="left" /> </asp:BoundField> <asp:BoundField HeaderText="" DataField="operators" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="left" /> </asp:BoundField> <asp:BoundField HeaderText="" DataField="Days" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right"/> </asp:BoundField> <asp:BoundField DataField="PlannedDt" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" DataFormatString="{0:dd-MMM-yyyy}" HtmlEncode="false" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right" /> </asp:BoundField> <asp:BoundField DataField="PlancedEnddt" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" DataFormatString="{0:dd-MMM-yyyy}" HtmlEncode="false" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right" /> </asp:BoundField> <asp:BoundField DataField="Operator" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="left" /> </asp:BoundField> <asp:BoundField DataField="ActualDays" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right" /> </asp:BoundField> <asp:BoundField DataField="ActualStartDt" HeaderText=" " ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" DataFormatString="{0:dd-MMM-yyyy}" HtmlEncode="false" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right" /> </asp:BoundField> <asp:BoundField DataField="ActualEndDt" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell " DataFormatString="{0:dd-MMM-yyyy}" HtmlEncode="false" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right" /> </asp:BoundField> <asp:BoundField DataField="IssuePending" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell " > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right" /> </asp:BoundField> <asp:BoundField DataField="rack" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-size="Small" HeaderStyle-CssClass="fixedheadercell" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Right" /> </asp:BoundField> <asp:BoundField DataField="Remark" HeaderText="" ItemStyle-Font-Size="Small" HeaderStyle-Font-Size="Small" HeaderStyle-CssClass="fixedheadercell" > <HeaderStyle BorderStyle="Outset" /> <ItemStyle BorderStyle="Outset" HorizontalAlign ="Center" /> </asp:BoundField> </Columns> </asp:GridView>
  22. hello, I am trying pass values ​​from ajax to php without refresh the page, I have a drop down list, and when I choose an option,I want send a value to ajax . now to change values in the "form", I want, the value who I have send to the ajax transform in php variable. PHP: <? $result = mysql_query("SELECT id_subuniverso, subuniverso, ref FROM tbl_sub_universo ORDER BY subuniverso ASC"); echo'<select name="sub_uni" id="subuniverso" onchange="show();"> <option value="0" size="35">..........Seleccione o Sub-Universo..........</option>'; while( $row = mysql_fetch_array($result)){ if ($row[0]== $subcat_id)echo '<option selected="yes" value="'.$row[0].'">'.$row[2].' - '.$row[1].'</option>';elseecho'<option value="'.$row[0].'">'.$row[2].' - '.$row[1].'</option>'; } mysql_free_result( $result ); echo"</select>";?> AJAX <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script><script type="text/javascript">function show(){var option = document.getElementById('subuniverso').selectedIndex;var ref = document.getElementById('subuniverso').options[option].text.substr(0,3); alert( ref); // <- Retorna os dados em array dos option selecionados $.ajax({ url: 'inser_actividade.php', type: 'POST', data: {ref : ref}, cache: false, success: function(response) { alert('foi enviado com sucesso' + ref) }, } );};show();</script>
  23. hi everyone, i am currently having an issue with the following excerpt of javascript - particularly the "regular expressions not wanting to replace". case 19: // set where Prim_Att_Val document.getElementById("ajaxbg").style.visibility = "visible"; var val = document.form_services.where_primattval.options[form_services.where_primattval.selectedIndex].value; // new constraint var title = document.getElementById("table_results").tHead.children[1].title; // current constraints //salert("re = ^/[ AND]*" + quote(" `Prim_Att_Val` = ""+where["Prim_Att_Val"]+""") + "/g"); //salert("val = "+val); //salert("title = "+title); if (whereo["Prim_Att_Val"]==-1) { document.getElementById("table_results").tHead.children[1].title += ((wherecnt>0)?" AND":"")+" `Prim_Att_Val` = ""+val+"""; where["Prim_Att_Val"] = val; whereo["Prim_Att_Val"] = wherecnt; wherecnt++; } else { //salert(whereo["Prim_Att_Val"]); //salert(val); document.getElementById("table_results").tHead.children[1].title = title.replace(re = new RegExp("/"+quote("`Prim_Att_Val` = "" + where["Prim_Att_Val"]+""")+"/g"),(val!="")?"`Prim_Att_Val` = ""+val+""":val); if (!where["Prim_Att_Val"]) whereo["Prim_Att_Val"] = -1; salert(title); salert(re.toString()); salert("`Prim_Att_Val` = ""+val+"""); salert(whereo["Prim_Att_Val"]); where["Prim_Att_Val"] = val; } document.getElementById("ajaxbg").style.visibility = "hidden"; break; salert is a custom function which prints to a div at the top of the screen. same results could be achieved by calling alert, it's just neater with all the data being kept and new lines being written. what is the issue with line 680 - it is not replacing the values as expected? in case 13, it does however - this does not have the string inserted into the regular expression to search for... anybody, please help!
  24. Taking a free course i found online. The 2nd assignment that I am stuck on. Create a Web page that asks users for a value. The program should then display the square(num * num) and the cube (num*num*num) of the number on the screen. Can anyone give me some help to get me started? So far I have this written out but I have no clue how to take the inputted value and calculate using a variable...? Any help would be much appreciated!! <html> <head> <title>Logical AND Operator</title> </head> <body bgcolor="lightblue"> <big> <script type="text/javascript"> var answer = prompt("Enter a value", ""); </script> </big> </body> </html>
  25. Hi Everyone, I've use case lets us say in a paragraph i've 100 lines i need to display first 50 lines and other 50 lines should not be displayed.But when i click on Read More link all the lines should be displayed(100 lines). When the 100 lines are displayed then the close link should be enabled and when i click on the link 50 lines should be displyed. Thanks in advance!!
×
×
  • Create New...