JavaScript - Emailing Data
I am still learning HTML, JavaScript and web design, so be patient with and reply in details.
I want to be able to send data store in JavaScript variable to my email account. I have tried using mailto: command and for some reason it doesn't work. C Can someone please show me how to in details. Similar TutorialsI wrote quiz using HTML and JavaScrip. Score is accumulated in a variable called myScore. Now I want to email the result of myScore to an email address. How do I go about doing this? I don't want to use the mailto: command since that require that user actually press the send command to send the email. I want this done automatically after user finishes the quiz. Please explain all replied in details since I am new to JavaScript and still learning. I'm trying to make a similar form to what Craigslist uses where you can mail to a user provided email and make it look like it came from whatever email address the user provides. I've looked at the code from the Craigslist page and can't seem to find the correct program they are using. I've been out of the game for a while and saying my coding is rusty is an understatement. Any help would be appreciated. I know almost nothing about javascript, but the guy who used to handle my company's forms has moved on and I need to edit one. Specifically, the form has a field for a district number, and I need to set it up so that if a certain district number is entered, the form submission gets emailed to a specified email address. I'm not trying to make it an email-only form - the results have to be posted in an output file as well. I've tried googling for an answer but haven't found anything that answers my question. Maybe that's because I don't know enough javascript to understand the answers. Can anyone help?? Thanks! I've not done anything with JavaScript before, so I'm not sure what syntax error I'm committing. I have a form made in Acrobat 9 for the Mac, and on it there is a "submit via email" button. I want the resulting email, which will contain the filled out Acrobat form as an attachment, to use field from the form to populate the subject line and the CC address field. I've bodgered together some code from this Acrobat user's post, but in trying to customize it, my script has fallen apart. I think it should be a simple fix, but since I'm so new, I can't see it. My script so far is: Code: // This is the form return e-mail. Its hardcoded // so that the form is always returned to the same address // Change address on your form var cToAddr = "fogharty@xxx.xxx"; // First, get the client CC e-mail address var cCCAddr = this.getField("Teacheremail").value; // Set the subject and body text for the e-mail message var cSubLine = "this.getField("CourseNumber").value; + "corrections form submitted by " + + this.getField("TeacherName").value; var cBody = "\n Thank you for submitting your form.\n" + "Save the mail attachment for your own records"; // Send the form data as an PDF attachment on an e-mail this.mailDoc({bUI: true, cTo: cToAddr, cCc: cCCAddr, cSubject: cSubLine, cMsg: cBody}); So I would like the subject line to read (CourseNumber) corrections form submitted by (TeacherName) Acrobat tells me I have a "SyntaxError: missing ; before statement 11: at line 12" but no matter how I tweak it, I keep getting that message. I put the semi-colon in, I take the semi-colon out, I put the semi-colon back in and shake it all about.... nothing. Any help someone could give me will be greatly appreciated, thanks Oh, and would there be a way to have the sent pdf form have it's name from a couple of fields as well? So that the attached file will be called "(CourseNumber).pdf"? Hi, I have a div "bigPicture" which contains an image of Thai food. Image can change based on a users onclick of thumbnails. Each image as it passes through div "bigPicture" needs to have the values: price, description and Date,Time associated with it. How do I assign those values and use them later in a Shopping Cart environment. I have tried getelementbyId.innerHTML using alert to see what I can get but it is too much information. website address is http://www.kohchangbookingandinforma.../ATT/index.asp Thanks for your consideration Robby Hi, I am trying to pass data from one page to the next using a search. I have a search engine and im trying to get it to pass the data of the search to the search results page. im using this code
Code: <script type="text/javascript"> window.onload = function (){ try{document.getElementById('q').focus();}catch(e){} } function search() { var search_text = document.getElementById('q').value; window.location = '/search/'+encodeURI(search_text)+'/'; return false; } </script> and I am using this for the search Code: <form action="/search/" method="post" onSubmit="return search();"> <input type="text" id="q" name="q" value="" class="searc" style="width:350px; height:30px; font-size:18px; color:#C19051" /> <input type="submit" style="height:30px;" value="Search" class="submit"/> </form> Can anybody help me with this? Thanks Anyone that can help on this one it would be greatly appreciated... I need to make a form parses a result from column 1 of txt/csv file that has 7 columns. Column 1 is pay, column 2-7 are how many and the associated rows are the answers. In short 1 2 3 4 5 6 700 50 55 62 75 80 99 so if the customer enters i make 700 and i need 2 the result would be 55 as the output. Any idea on how to make that work with javascript? if (pay <=700 && widgets = 2) { document.write(55) elseif (pay <=700 && widgets = 1) document.write(50) is this doable and is it the easiest way to accomplish this? Code: rownumber = 2; detailsTable = document.getElementsByName("detailsTable"); detailsRow = detailsTable.getElementsByTagName("tr")[rownumber]; name = detailsRow.getElementsbyTagName("td")[0]; address = detailsRow.getElementsbyTagName("td")[1]; address2 = detailsRow.getElementsbyTagName("td")[2]; phone = detailsRow.getElementsbyTagName("td")[3]; email = detailsRow.getElementsbyTagName("td")[4]; alert(name); I have been told if I want to get the text from each cell I can use: alert(name.firstChild.nodeValue); But I don't understand how to do this for what I am wanting to do. Here is my HTML: Code: <table border="0" name="detailsTable"> <tr> <td>a</td> <td>b</td> <td>c</td> <td>d</td> <td>e</td> </tr> </table> need help.... I need to create a web page that can pull data from sensatronics senturion sensor probe. The unit has a web server that displays temperature, humidity,etc. You can also query it for from telnet or webpage which kicks back xml. My page needs to read the values of the probes. I don't know much about javascript and have been unsuccessful trying to use httprequest. I guess this would be considered cross domain as well? Here is the XML that is generated from the unit. I get this by pulling through a web browser x.x.x.x/xmldata Thanks <?xml version="1.0" encoding="ISO-8859-1"?> <Sensatronics id="S10604" hb="10554"> <Group id="1"> <Probe id="100"><Value>75.2</Value></Probe> </Group> <Group id="2"> </Group> <Group id="3"> </Group> <Group id="4"> </Group> <Group id="5"> </Group> <Group id="6"> </Group> <Group id="7"> </Group> <Group id="8"> </Group> <Group id="9"> <Probe id="99"><Value>1.0</Value></Probe> <Probe id="1"><Value>79.5</Value></Probe> <Probe id="2"><Value>34.3</Value></Probe> <Probe id="3"><Value>35.6</Value></Probe> <Probe id="4"><Value>0.0</Value></Probe> </Group> </Sensatronics> Html Code Code: <div id="itemStockUnit"> Qty <input type="text" size="2" value="1" class="quantity"> <select id="stockUnit" style="width:100%"> <option rel="Window1;7-10;153.00;140.24;">615W x 705H (mm)</option> <option rel="Windows2;7-10;187.00;171.09;">625W x 745H (mm)</option> <b>Delivery:</b> <span id="itemDeliveryTime">7-10</span> days <br> <small><b>RRP:</b> £<span id="itemRRPPrice">153.00</span></small> <br> <b>Our Price: <span id="itemOurPrice">£140.24</span></b> </div> JavaScript Code: <script type="text/javascript"> google.setOnLoadCallback(function() { $("#stockUnit").change(function(){ var data = ($("option:selected",this).attr("rel")).split(";"); $("#itemDeliveryTime").fadeOut().html(data[1]).fadeIn(); $("#itemRRPPrice").fadeOut().html(data[2]).fadeIn(); $("#itemOurPrice").fadeOut().html(data[3]).fadeIn(); }); }); </script> I have set data types to each option however the javascript above doesnt make it change any help? Hi guys, I'm trying to run this sample file that i got from the google docs. I want to write a stock ticker from google finances xml feed and this is a sample they had. Code: <?xml version="1.0" encoding="utf-8"?> <Module> <ModulePrefs title="hellofinance"> <Require feature="finance"/> </ModulePrefs> <Content type="html"> <![CDATA[ Hello world! Here is your portfolio:<br/> GOOG: <span id=_IG_SYM1_l></span> (<span id=_IG_SYM1_c></span>)<br/> AAPL: <span id=_IG_SYM2_l></span> (<span id=_IG_SYM2_c></span>)<br/> INTC: <span id=_IG_SYM3_l></span> (<span id=_IG_SYM3_c></span>)<br/> <script> var quote = new google.finance.Quote(); quote.enableDomUpdates( { 'GOOG' : '_IG_SYM1', 'AAPL' : '_IG_SYM2', 'INTC' : '_IG_SYM3' } ); quote.getQuotes(["GOOG", "AAPL", "INTC"]); </script> ]]> </Content> </Module> my problem is i don't know how to execute it so i can see how it works. I tried sticking this code within a php file and it returns an error on the first line for unexpected t-string. So i tried changing the extension to xml and it just displays the code but does not execute. I'm stumped. Any help is appreciated. Thanks P.S. - Yes i do have the zend gdata framework installed and running on my server and is working correctly according to their test. Hello, Im new to JavaScript and this forum, right now im looking for a simple JS script, that will get the data out from the url and print it on my webpage: http://www.asecurecart.net/server/ca...report=1&xml=1 I think it should looks like this: Mypage.htm Code: < Some JavaScript Code Im looking for> <html> Your shopping cart: <br> Items: <script type="text/JavaScript"><!--document.write(item_total)//--> </script> <br> Order Total: <script type="text/JavaScript"><!--document.write(order_total)//--> </script> </html> Any help would be very appreciated. Thanks. I am working on a simple movie database to practise my JavaScript and have encountered difficulty extracting information from the xml file. Let me explain my scenario. Sorry if it gets a bit long-winded! The interface I have created has three columns which each serve the following functions: Column 1 -> The user selects a film of their choice. Column 2 -> Once the user has selected a film in Column 1 then more information about the film appears in this column. This includes title, director and cast. The user has the option of then selecting a cast member to find out information about them. Column 3 -> Once the user has selected a cast member in Column 2 then their name and a picture of them appears in this column (using the <img> tag). This information in this column also includes the film title, film artwork (applied <img> tag). But the difficulty I have encountered is as follows - I have a rough idea of how to update column 2 in real time to reflect the changes in Column 1. The method I am using for acquiring the relevant information in Column 2 is creating an array then using the indexOf to retrieve a the details of a specific film. I know this method is wrong and it would be better to pull the relevant information from the xml file. How do I use the idx from the Column 1 selection to pull out the relevant information to put in Column 2 and 3? Here is what I've done so far: Code: <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> function XMLload() { jQuery.post(url, function(data) {getxml(data)}, 'xml'); } function dataFromTag(node, t) { var d = node.getElementsByTagName(t); if (d.length == 0) return (''); return (d[0].firstChild.nodeValue); } jQuery(document).ready(function() {XMLload();}); var url = 'movie.xml'; var xmlMovies; var aryMovieList = []; var xmlActors; var aryActors = []; var iframeOpen = '<html><head><\/head><body>' var iframeClose = '<\/select><\/form><\/body><\/html>' function getxml(xmldoc) { xmlMovies = xmldoc.getElementsByTagName('movie'); var hstr = iframeOpen; hstr += '<select size="' + xmlMovies.length + '" onchange="parent.actors(this.selectedIndex);">'; for (var MovieID = 0; MovieID < xmlMovies.length; MovieID++) { aryMovieList[aryMovieList.length] = dataFromTag(xmlMovies[MovieID], "title"); xmlActors = xmlMovies[MovieID].getElementsByTagName("actor"); for (var ActorID = 0; ActorID < xmlActors.length; ActorID++) { aryActors[aryActors.length] = dataFromTag(xmlMovies[MovieID], "director") + "/" + dataFromTag(xmlMovies[MovieID], "title") + "/" + dataFromTag(xmlActors[ActorID], "name"); } hstr += '<option>' + aryMovieList[MovieID] + '<\/option>'; } hstr += iframeClose; // test for aryMovieList // alert(aryMovieList); // test for aryActors // alert(aryActors); with(document.getElementById('movies').contentDocument) { open(); write(hstr); close(); } } function actors(idx) { var hstr = iframeOpen; var selectActor = []; hstr += 'title: ' + dataFromTag(xmlMovies[idx], 'title'); hstr += '<br>'; hstr += 'director: ' + dataFromTag(xmlMovies[idx], 'director'); hstr += '<br>'; for (var i = 0; i < aryActors.length; i++) { var aryActorList = aryActors[i].indexOf(dataFromTag(xmlMovies[idx], 'director') + '/' + dataFromTag(xmlMovies[idx], 'title')); if (aryActorList >= 0) { selectActor[selectActor.length] = i; } } // alert(selectActor); hstr += '<select size="' + selectActor.length + '" onchange="parent.info(this.selectedIndex);">'; for (var i = 0; i < aryActors.length; i++) { var aryActorList = aryActors[i].indexOf(dataFromTag(xmlMovies[idx], 'director') + '/' + dataFromTag(xmlMovies[idx], 'title')); if (aryActorList >= 0) { hstr += '<option>' + aryActors[i].substring(aryActors[i].lastIndexOf("/") + 1) + '<\/option>'; } } hstr += iframeClose; with(document.getElementById('actors').contentDocument) { open(); write(hstr); close(); } } function info(idx) { var hstr = iframeOpen; hstr += ''; hstr += iframeClose; with(document.getElementById('info').contentDocument) { open(); write(hstr); close(); } } </script> </head> Here is the XML file in use: Code: <movies> <movie> <title>Match Point</title> <director>Woody Allen</director> <image>Match-Point.jpg</image> <actor> <name>Scarlett Johansson</name> <image>Scarlett-Johansson.jpg</image> </actor> <actor> <name>Brian Cox</name> <image>Brian-Cox.jpg</image> </actor> <actor> <name>Matthew Goode</name> <image>Matthew-Goode.jpg</image> </actor> <actor> <name>Penelope Wilton</name> <image>Penelope-Wilton.jpg</image> </actor> </movie> <movie> <title>Inception</title> <director>Christopher Nolan</director> <artwork>Inception.jpg</artwork> <actor> <name>Leonardo DiCaprio</name> <image>Leonardo-DiCaprio.jpg</image> </actor> <actor> <name>Ken Watanabe</name> <image>Ken-Watanabe.jpg</image> </actor> <actor> <name>Joseph Gordon-Levitt</name> <image>Joseph-Gordon-Levitt.jpg</image> </actor> <actor> <name>Marion Cotillard</name> <image>Marion-Cotillard.jpg</image> </actor> <actor> <name>Ellen Page</name> <image>Ellen-Page.jpg</image> </actor> <actor> <name>Tom Hardy</name> <image>Tom-Hardy.jpg</image> </actor> </movie> <movie> <title>Blade II</title> <director>Guillermo del Toro</director> <artwork>Blade-II.jpg</artwork> <actor> <name>Wesley Snipes</name> <image>Wesley-Snipes.jpg</image> </actor> <actor> <name>Kris Kristofferson</name> <image>Kris-Kristofferson.jpg</image> </actor> <actor> <name>Ron Perlman</name> <image>Ron-Perlman.jpg</image> </actor> <actor> <name>Leonor Varela</name> <image>Leonor-Varela.jpg</image> </actor> <actor> <name>Norman Reedus</name> <image>Norman-Reedus.jpg</image> </actor> </movie> <movie> <title>Pulp Fiction</title> <director>Quentin Tarantino</director> <artwork>Pulp-Fiction.jpg</artwork> <actor> <name>John Travolta</name> <image>John-Travolta.jpg</image> </actor> <actor> <name>Samuel L Jackson</name> <image>Samuel-L-Jackson.jpg</image> </actor> <actor> <name>Uma Thurman</name> <image>Uma-Thurman.jpg</image> </actor> <actor> <name>Harvey Keitel</name> <image>Harvey-Keitel.jpg</image> </actor> </movie> <movie> <title>Avatar</title> <director>James Cameron</director> <artwork>Avatar.jpg</artwork> <actor> <name>Sam Worthington</name> <image>Sam-Worthington.jpg</image> </actor> <actor> <name>Zoe Saldana</name> <image>Zoe-Saldana.jpg</image> </actor> <actor> <name>Stephen Lang</name> <image>Stephen-Lang.jpg</image> </actor> <actor> <name>Michelle Rodriguez</name> <image>Michelle-Rodriguez.jpg</image> </actor> </movie> </movies> Many thanks in advance! Hi, I would like to use the following chart in my webpage http://people.iola.dk/olau/flot/examples/visitors.html the data being used in the chart example above looks like this: [1196722800000, 77], [1196809200000, 3636], [1196895600000, 3575], ... I guess that the long number is the date?! The data I have is: a date that is coming from my database which was added using the date(); object and a numerical figure such as 21.365 or 30.432 or 36.856 here is my code below currently in a list format (HTML): Code: <script type="text/javascript" charset="utf-8"> var html5rocks = {}; html5rocks.webdb = {}; html5rocks.webdb.db = null; html5rocks.webdb.open = function() { var dbSize = 10 * 1024 * 1024; // 10MB html5rocks.webdb.db = openDatabase("Todo", "1.0", "Todo manager", dbSize); } html5rocks.webdb.createTable = function() { var db = html5rocks.webdb.db; db.transaction(function(tx) { tx.executeSql("ALTER TABLE bmical ADD bmires INTEGER"); tx.executeSql("CREATE TABLE IF NOT EXISTS bmical(ID INTEGER PRIMARY KEY ASC, height1 TEXT, weight1 TEXT, bmires TEXT, added_on DATETIME)", []); }); } html5rocks.webdb.addTodo = function(todoText) { var db = html5rocks.webdb.db; db.transaction(function(tx){ var weight1 = document.getElementById("weight1").value; var height2 = todoText / 100 var BMI = weight1 / (height2 * height2) var BMI = BMI; var bmires = BMI.toFixed(3); var addedOn = new Date(); tx.executeSql("INSERT INTO bmical(height1, weight1, bmires, added_on) VALUES (?,?,?,?)", [todoText, weight1, bmires, addedOn], html5rocks.webdb.onSuccess, html5rocks.webdb.onError); }); } html5rocks.webdb.onError = function(tx, e) { alert("There has been an error: " + e.message); } html5rocks.webdb.onSuccess = function(tx, r) { // re-render the data. html5rocks.webdb.getAllTodoItems(loadTodoItems); } html5rocks.webdb.getAllTodoItems = function(renderFunc) { var db = html5rocks.webdb.db; db.transaction(function(tx) { tx.executeSql("SELECT * FROM bmical ORDER BY added_on DESC", [], renderFunc, html5rocks.webdb.onError); }); } html5rocks.webdb.deleteTodo = function(id) { var db = html5rocks.webdb.db; db.transaction(function(tx){ tx.executeSql("DELETE FROM bmical WHERE ID=?", [id], html5rocks.webdb.onSuccess, html5rocks.webdb.onError); }); } function loadTodoItems(tx, rs) { var rowOutput = ""; var todoItems = document.getElementById("todoItems"); for (var i=0; i < rs.rows.length; i++) { rowOutput += renderTodo(rs.rows.item(i)); } todoItems.innerHTML = rowOutput; } function renderTodo(row) { return "<li>On: " + row.added_on + " Height: " + row.height1 + " Weight: " + row.weight1 + " BMI: " + row.bmires + "<a class='delete' href='javascript:void(0);' onclick='html5rocks.webdb.deleteTodo(" + row.ID +");'>Delete</a></li>"; } function init() { html5rocks.webdb.open(); html5rocks.webdb.createTable(); html5rocks.webdb.getAllTodoItems(loadTodoItems); } function addTodo() { var height1 = document.getElementById("height1"); html5rocks.webdb.addTodo(height1.value); height1.value = ""; } </script> the 2 variables I'd like to use a bmires, addedOn I have a some code that I have been working on but I do not have the greatest understanding of cookies. If someone could help me out with this it would be greatly appreciated. Basically I have a cookie called webvpn and I need the data from the content part of the cookie. Then I need to use that at the beginning of my url. The content looks something like this, 791152394@265814016@1305568856@B762F295B8829D242481C9DD285D0339A719D96C So I need to get the data from content and then use that in the code where it says VARFROMCOOOKIEHERE then basically the rest of the link goes after it. Here is what I have so far: Code: <html> <body> <script language="javascript" type="text/javascript"> if (navigator.appVersion.indexOf("Mac")!=-1){ var str = "Smart-Tunnel Test MACS"; document.write(str.link("https://thenet.cckl.org/+CSCOE+/tunnel_mac.jnlp?app=/Applications/Firefox.app/Contents/MacOS/firefox-bin&url=http%3A%2F%2Fgroups%2Fpsnet%2FDirect.htm")); } else { var str = "Smart-Tunnel Test IE"; document.write(str.link("https://thenet.cckl.org/+CSCOE+/appstatus/VARFROMCOOKIEHERE?method=get&query=startstpage&url=http%3A%2F%2Fgroups%2Fpsnet%2FDirect.htm")); } </script> </body> </html> A minor modification to the http://smoothiecharts.org/ example. line2.append(new Date().getTime(), Math.random()); becomes line2.append(new Date().getTime(), updist()); var x = 0; function updist() { x = ("<?PHP phpread() ?>"); return (x); } <?php function phpread() { $t=$x=$y=$z=0; $fd = fopen ("/tmp/seis", "r"); // /tmp/seis is a single line that changes 20/sec $foo = fscanf ($fd, "%s", &$t); fclose($fd); $i = explode (",", $t); echo "$i[2]"; // should go: 2 7 9 4 0 -1 -8 -4 -5 2....... instead I get 2 2 2 2 2 2 2 2 } ?> ---------------- So "line2.append..." calls updist which calls phpread which works fine - once. It's as if the phpread caches the results of the read and never rereads the file. I'm snowed. Thanks Chuck Hello! I was wondering if it is possible with Javascript to keep the values of certain variables in memory, even if another page has been loaded. My aim is to gather information from a few pages and, when come to the last page, submit them all together to the perl script. My first page looks like: Code: <form name="step1" method="post" action="/cgi-sys/formmail.pl"> <input type="hidden" name="recipient" value="pavlos.thes@gmail.com"/> <input type="hidden" name="subject" value="Poll Results"/> <input name="radiobutton" type="radio" value="Grill"> Grill <input name="radiobutton" type="radio" value="Club"> Club Sandwich <input name="radiobutton" type="radio" value="Crepes"> Crepes <input name="radiobutton" type="radio" value="Toast"> Toast <input name="radiobutton" type="radio" value="Hotdog"> Hot Dog <input name="radiobutton" type="radio" value="Special"> Special Products <input name="radiobutton" type="radio" value="Salads"> Salads <p> <input type="button" name="Submit" value="Next Question >" onclick="javascript:location.href='Poll_Jan2010_02.html'"> </form> And the next ones look pretty much the same, only the name of the form changes (step2, step3, step4 etc), and the url of the location.href in the end (Poll_Jan2010_03.html, Poll_Jan2010_04.html, etc) and of course in the next pages i might use checkboxes or textfields instead of radiobuttons. Could someone help me out doing this? Hello everybody, I have the following problem: I have a form in a page in which you have multiple choices on how you would like the data from an XML file to appear. What I want is that when I pick the subsequent selections they be displayed in the next page. For example (you have chosen cyan, and a range from 10-50, etc) i want the xml to appear on a third page in the way that i selected it, generating at the same time automatically the respective xsl file. record from xml Code: <myxml> <record> <id>1</id> <football_team>Aberdeen</football_team> <position>28</position> <ddd>Mbira</ddd> <www>833.48</www> <ball>Aberdeen</ball> <bin>42</bin> <bat>Jew's harp</bat> <bend>10</bend> </record> </myxml> (the xml created from a db using php ) I have been stuck with this problem for over a week now and I'm going crazy. Thank you for your help in advance. If you need further info please tell me to post it. i have know that JavaScript the data types are either:Primitive (number", "string", "boolean", "undefined",null), or Non-primitive (objects). but why the return values of using typeof can be "function"? i feel this collide with the above. hello i am trying to fire a form which after the call to retrieve the data, populate the form with the data. i can see from firebug that the json data is being captured, but cannot seem to be able to populate the form with it. i am using a jquery plugin facybox, that opens the form, but the fields are blank. i have attached my code and would be grateful if someone could tell me where i am going wrong? many thanks js code Code: <script type="text/javascript"> function edit(com, grid) { if (com == 'Edit') { if($('.trSelected').length>0){ if($('.trSelected').length>1){ alert('Please select just one row'); return; } var items = $('.trSelected'); var itemlist =''; for(i=0;i<items.length;i++){ itemlist+= items[i].id.substr(3); } $.ajax({ type: "POST", dataType: "json", url: "tempcontact.php", data: "items="+itemlist, success: function(data){ document.getElementById('id').value = data.id; document.getElementById('email').value = data.email; $("#flex1").flexReload(); } }); /*and so on then you can call facybox*/ jQuery.facybox({ div: "#editform"}); } else{ alert('Please select a row to edit.'); } } } </script> form Code: <div id="editform" style="display:none;"> <form action="conedit.php" method="post" class="webform"> <fieldset> <legend><span>Update Contact</span></legend> <br /> <div id="dataText">Please delete the fields if there is no data 'No data to display'.</div> <label for="id">ID:</label> <input id="id" name="id" class="text" type="text" value="" /> <label for="name">Full Name:</label> <input id="name" name="name" class="text" type="text" value="" /> <label for="email">Email address:</label> <input id="email" name="email" class="text" type="text" value="" /> <label for="phone">Telephone:</label> <input id="phone" name="phone" class="text" type="text" value="" /> <label for="mobile">Mobile:</label> <input id="mobile" name="mobile" class="text" type="text" value="" /> <label for="fax">Fax:</label> <input id="fax" name="fax" class="text" type="text" value="" /> <label for="notes">Notes:</label> <textarea name="notes" cols="25" rows="3"></textarea> </fieldset> <input class="submit" type="submit" name="submit" value="Update" /> </form> </div> |