Jump to content

Search the Community

Showing results for tags 'javascript'.

  • 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. Hello, I have an XML file called cookbook.xml as well as an XSL file linked to it, called cookbook.xsl that presents all the information found in the .xml file in an html table (with headings, seperate cells, etc.) Now I want to create an html file that will presenet the above complete table on page load, as well as some query fields above that table, so that the table is refreshed according to a user's input (filters..) More specifically: XML file: For each cookbook (represented by a recipestories element), the file contains information about its title, author(s), year and page numbers, among others As for the HTML file, the user should be able to filter the results appearing on the table as follows: for each of author, title and year, the user should be able to enter a value (e.g. 1990) as well as an operator (e.g., <, =, >) and retrieve the cookbooks satisfying the corresponding conditions (e.g., year=1990). The user should be able to enter conditions for any combination of these three properties. If no conditions are entered, all cookbooks should be returned. For author and title, the user should also be able to enter "contains" as an operator, along with some value. In this case, the system should return cookbooks where the corresponding author or title contains the value entered as a substring. For example, I might want all papers where the title contains the string "choco". The user should also be able to search for cookbookss by their number of authors. Here too an operator and value should be allowed (e.g., all cookbooks with at least 3 authors). The user should be able to specify the property (author, title, pages or year) by which the returned cookbooks should be sorted. This is where I am right now: <html> <script type="text/javascript"> function loadXML(file) //function for loading XML files{ var moz = (typeof document.implementation.createDocument != 'undefined'); var ie = (typeof window.ActiveXObject != 'undefined'); var xmlDoc; if (moz) xmlDoc = document.implementation.createDocument("", "", null); else if (ie) xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); xmlDoc.async = false; xmlDoc.load(file); return xmlDoc;} </script> <script type="text/javascript"> var xmlDoc = loadXML("cookbooks.xml");var stylesheet = loadXML("cookbooks.xsl");var moz = (typeof document.implementation.createDocument != 'undefined');var ie = (typeof window.ActiveXObject != 'undefined'); if (moz){ var nsResolver = stylesheet.createNSResolver(stylesheet.ownerDocument == null ? stylesheet.documentElement:stylesheet.ownerDocument.documentElement); ..........} else if (ie){ var value = stylesheet.selectSingleNode(............} </script> </html> that is pretty basic I know, but I'm also pretty lost and desperate and I don't know where to start from! Do I create an html form with the fields for the queries and a submit button? Do I then take all the values entered in the above form and "spread them out" in that NSResolver function I'm trying to create above, evaluate them and reapply the stylesheet to the xml file accordingly? Help!
  2. Okay, I understand what it does, but I'm having troubles understanding the process of the set/getCookie functions given as examples in the w3schools tutorial.I'm a jQuery junkie trying to ramp up to serious scripting (eventually with Ajax and PHP as its becoming apparent). While the school lessons have been invaluable I notice they don't always have a comprehensive list of objects, methods, or actions that can be done. For instance in the Cookie examples, how where does 'exdays' get defined, what do escape() and unescape() do, etc. I understand parts but others seem completely unexplained. Are there any more comprehensive explanations of the cookie?Also, another example, they talk about the setTimeout and clearTimeout, but I never saw setInterval anywhere... that seems like an important thing to leave out of the school so I'm assuming there's 'gotta be a site out there where a full list of events and objects is being updated more regularly.Thanks!
  3. I'm not sure if this is the best place to ask this, but I'm not sure which section it fits best under. I've been asked to build a site that smoothly scrolls content and I don't know where to start. I'm trying to build something like the top part of this site where you click on the arrows and it scrolls to another set of stories. I've tried to disect the code on the site, but when I try to implement it myself it doesn't work. I pressume it's some sort of jquery plugin but that's as far as I've got with it. I'd be grateful for any help on this as I've been trying to work it out for months and haven't got anywhere - except now have less hair!! Thanks.
  4. Okay, here is the problem, the background to it is a little bit lengthy but please bear with me as I think it's probably essential to getting to the root of it. I'm trying to design an on-site navigation system using straight javascript and jquery. The site is for a photographer who has a number of galleries of her images she wants to put up. These are displayed on the page as a series of thumbnails which are arranged in a grid (lets say 3 by 3 here for simplicity's sake). The idea is that these can either be displayed in order of size or in order of the date the gallery was updated. There are two buttons at the top of the page 'size' and 'date' and whenh one of these is clicked the thumbnails should animate into the new position. I've reduced the arrays to their essential parts for the purposes of this question. They're defined in the header of the page as follows: //order: id, gallery size, gallery date (UK format), thumbnail url. x position (px), y position (px) var galDate = new Array();galDate[0] = [0, 7, 12-2-2012,"images/image5.jpg", 100, 100]; galDate[1] = [6, 2, 1-2-2012,"images/image0.jpg", 200, 100]; galDate[2] = [4, 10, 24-1-2012,"images/image8.jpg", 300, 100]; galDate[3] = [9, 3, 11-12-2011,"images/image7.jpg", 100, 200]; galDate[4] = [7, 14, 4-8-2011,"images/image6.jpg", 200, 200]; galDate[5] = [2, 32, 3-8-2011,"images/image3.jpg", 300, 200]; galDate[6] = [8, 11, 10-6-2011,"images/image2.jpg", 100, 300]; galDate[7] = [5, 5, 1-6-2011,"images/image1.jpg", 200, 300]; galDate[8] = [3, 7, 3-4-2011,"images/image4.jpg", 300, 300]; var galSize = new Array();galSize[0] = [2, 32, 3-8-2011,"images/image3.jpg", 300, 200]; galSize[1] = [7, 14, 4-8-2011,"images/image6.jpg", 200, 200]; galSize[2] = [8, 11, 10-6-2011,"images/image2.jpg", 100, 300]; galSize[3] = [4, 10, 24-1-2012,"images/image8.jpg", 300, 100]; galSize[4] = [3, 7, 3-4-2011,"images/image4.jpg", 300, 300]; galSize[5] = [0, 7, 12-2-2012,"images/image5.jpg", 100, 100]; galSize[6] = [5, 5, 1-6-2011,"images/image1.jpg", 200, 300]; galSize[7] = [9, 3, 11-12-2011,"images/image7.jpg", 100, 200]; galSize[8] = [6, 2, 1-2-2012,"images/image0.jpg", 200, 100]; Displaying the thumbnails and the animation is handled by three functions: which are defined in the <head> section of the page as follows: 'Swap' loops through the all the rows in array 1 defining the id, x position and y position as variables id1, x1 and y1 (please forgive the 'document writes' this was part of an earlier debugging attempt) function swap(array1, array2){for(i=0; i<array1.length; i++){var id1 = array1[0];document.write ('id1: ' + id1);document.write ('<br />');var x1 = array1[3];document.write ('x1: ' + x1);document.write ('<br />');var y1 = array1[4];document.write ('y1: ' + y1);document.write ('<br />'); // For each row in the first array, 'Swap' then loops through the second array. When the ids are equal, this triggers the 'animate' function, which then should handle the actual animation for(j=0; j<array2.length; j++){var id2 = array2[j][0];document.write ('id2: ' + id2 );document.write ('<br />');var x2 = array2[j][3];document.write ('x2: ' + x2 );document.write ('<br />');var y2 = array2[j][4];document.write ('y2: ' + y2 );document.write ('<br />'); if (id2==id1){animate(x2, y2);} //close if else {document.write('for loop i should continue');document.write ('<br />'); } } //close for j } // close for i } // close function // 'Animate' is triggered when the ids from each of the arrays correspond and performs the animation (nb – this isn't working perfectly at the moment but the basic animation functionality is working – getting the right thumbnals to animate to the right places is something I have to come back to but its not the main problem at the moment). function animate(x2, y2){$("#"+i).animate({left:x2, top:y2},"slow");document.write ('animate function triggered');document.write ('<br />');} // The actual displaying of the thumbnails is handled by a third function called, surprisingly, 'display' which is as follows. function display (array) {for (i=0, max = array.length; i<max; i++){ $('#container').append('<div id="'+array[0]+'" style="position: absolute; left:'+array[6]+'px; top: '+array[7]+'px;"><a href="#"><img src='+array[5]+' height=75px width=75px></a></div>');}} I have all of the above in the this order in the header of the page. Finally, I have the jquery click function call which is as follows: $(document).ready(function() {$('#size').click(function() {swap (galSize, galDate);}); $('#date').click(function() {swap (galDate, galSize);}); display(galDate); }); The body of the page is as follows: <body><button id="size">Size</button> <button id="date">Date</button><div id="container"></div><script>display (galDate);</script></body> Just to be clear, I realise that some of the actual functionality isn't going to churn out the desired result in terms of positioning etc. The fact of the matter though is that the 'swap' function works in as far as it animates the images (I know because I've tested it!) :-) The problem I have (and thanks to those who've stayed with me thus far!) is that as soon as I click on one of the buttons (size or date) the displayed thumbnails disappear. The swap function is still working because all the 'document writes' display on the page and, similarly the animate function is triggered as well. Its just thet there are no thumbnails anymore and they're sort of central to the whole undertaking. As you can probably tell, I'm pretty new to this and there is no doubt an obvious explanation. The thing is, I don;t know what it is. Any ideas or nods in the right direction would be much appreciated. CheersStef
  5. Hey! I'm making a page that has to scroll sideways,to do this it needs to have an div wrapping the content that has the total width value.I was wondering if there is a way to let javascript calculate this automatically so i dont have to change the width every time i upload new content. many thanks in advance!
  6. Basically mostly people are confused that javascript is a another version of java which is generally a misconception .... so its not like that if you want to know more about it and abou its history....you can go for this links.1. http://techywheels.com/2012/02/03/about-javascript/2. http://techywheels.com/2012/02/09/power-of-javascript/3. http://techywheels.com/2012/02/21/first-javascript-program/4. http://techywheels.com/2012/02/21/external-javascript-program/
  7. Hi,Apologies if I'm doing something very obviously stupid here, I'm fairly new to this sort of thing. What I'm basically trying to do is crop a two dimensional array of coordinates to the same length as another array called from an sql database using php and then made useable in javascript via json_encode. The good news is that I've managed to accomplish this. The code below actually does this twice with the database information called in different orders so that I have two two-dimensional javascript arrays, each with an x and y coodinate tagged onto the end of each row. (For anyone who's interested in the whys and wherefores, the database contains information abpout different image galleries (title, description, thumbnail etc). I'm going to be using these two arrays along with jquery animate to allow visitors to the site to change the order in which thumbnails are displayed based on date gallery updated or gallery size). This all sort of works fine. There are a couple of functions, 'prune' which is the parent function (I think I'm using the terminology correctly) and two similar but separate 'populateArray' functions (1 and 2). The trouble is that the two inner functions don't seem to want to return a value. I can access the two arrays from within the populateArray functions but as soon as I try to return the values (as 'galDate' and 'galSize') I get nothing. Code is laid out below. Like I say, apologies if I'm making a really basic mistake here but I'm completely stumped and could do with a nod in the right direction. Thanks in advance.Stef <script>var sqlData1 = (<?php print json_encode($sqlData1);?>);var sqlData2 = (<?php print json_encode($sqlData2);?>); var coordinates = [['100px','100px'],['100px','200px'],['100px','300px'],['200px','100px'],['200px','200px'],['200px','300px'], ['300px','100px'],['300px','200px'],['300px','300px'],['400px','100px'],['400px','200px'],['400px','300px'],['500px','100px'],['500px','200px'],['500px','300px']]; //Function to make arrays the same length function pruneArrays(sqlData1,sqlData2, coordinates){ for(i=(coordinates.length-sqlData1.length); i>0; i--){ coordinates.pop(coordinates); } populateArray1(sqlData1, coordinates); populateArray2(sqlData2, coordinates); return();} //Function to create date ordered array with coordinatesfunction populateArray1 (sqlData1, coordinates){ for(i=0; i<sqlData1.length; i++){ for(j=0; j<(sqlData1.length-1); j++){ sqlData1.push(coordinates[j]); } } var galDate = sqlData1; //document.write(galDate); - if this line is active 'galDate' displays no problem //document.write ("<br /><br />"); return (galDate);} //Function to create size ordered array with coordinatesfunction populateArray2 (sqlData2, coordinates){ for(i=0; i<sqlData2.length; i++){ for(j=0; j<(sqlData2.length-1); j++){ sqlData2.push(coordinates[j]); } } var galSize = sqlData2; //document.write(galSize); - if this line is active 'galSize' displays no problem return (galSize);} document.write(pruneArrays(sqlData1, sqlData2, coordinates));// The line above however, doesn't return anything.</script>
  8. hey all, im really new to this and could really do with some help, it would be hugely appreciated!i have a toggle type setup for a list of live events but i cant seem to find an easier way or cleaner way to use it, any ideas? here is the code im using at the moment, sorry in advance for the way this is done! i need the setup to have neat slide down tables of info. Code as follows: <script type="text/javascript">// <![CDATA[var Current = "Div1";function Toggle(obj) {if(Current != obj) {document.getElementById(Current).style.display = "none";document.getElementById(obj).style.display = "block";Current = obj;}}// ]]></script><p style="text-align: center;"><em><strong><span style="background-color: #ffffff;"><a href="#" onclick="Toggle('Div1'); return false;"><span style="background-color: #ffffff;">Monday</span></a> | <a href="#" onclick="Toggle('Div2'); return false;"><span style="background-color: #ffffff;">Tuesday</span></a> | <a href="#" onclick="Toggle('Div3'); return false;"><span style="background-color: #ffffff;">Wednesday</span></a>| <a href="#" onclick="Toggle('Div4'); return false;"><span style="background-color: #ffffff;">Thursday</span></a>| <a href="#" onclick="Toggle('Div5'); return false;"><span style="background-color: #ffffff;">Friday</span></a> | <a href="#" onclick="Toggle('Div6'); return false;"><span style="background-color: #ffffff;">Saturday</span></a> | <a href="#" onclick="Toggle('Div7'); return false;"><span style="background-color: #ffffff;">Sunday</span></a></span></strong></em></p><div id="Div1" style="display: none;"><table border="0" rules="all" align="center"><tbody> For some reason when i click monday it actually does nothing, but if i click tuesday, then monday the info is there??
  9. My form is processed via action.php: <?phprequire_once 'login.php';$db_server = mysql_connect($db_hostname, $db_username, $db_password);if (!$db_server) die("Unable to connect to MySQL: " . mysql_error());$physichal_address = $_GET["physichaladdress"];$thelat = $_GET["thelat"];$thelng = $_GET["thelng"];$link = mysql_connect('localhost', 'root', '************');if (!$link) {die('Could not connect: ' . mysql_error());}mysql_close($link);?><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Free Wifi locations near you:</title><link type="text/css" href="style.css" rel="stylesheet" media="all" /><script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script><script type="text/javascript" src="map.js"></script></head><body><h1>Free Wifi locations near you:</h1><div id="map"></div><p>If you have any questions or comments please send them to the webmaster penguin@sepserver.net .</p></body></html> There is a referenced JavaScript in which I attempt to access PHP that fails: (function() {//function//window.onloadwindow.onload = function() {// Creating a reference to the mapDivvar mapDiv = document.getElementById('map');// Creating a latLng for the center of the mapvar latlng = new google.maps.LatLng(37.09, -95.71);// Creating an object literal containing the properties// we want to pass to the mapvar options = {center: latlng,zoom: 4,mapTypeId: google.maps.MapTypeId.ROADMAP};//window.onload// Creating the mapvar map = new google.maps.Map(mapDiv, options);google.maps.event.addListener(map, 'bounds_changed', function() {window.bounds = map.getBounds();<?php echo "alert(\"Hello World!\");" ?>});} })();//function Does anyone know why my call to PHP is breaking my JavaScript? I have done this before many times but I don't see why this is failing on my IIS7 + PHP configuration. "info.php" outputs just fine! Thank you so much!
  10. Hi guys i am trying to create a function called enterName which will have two parameters firstname and lastname. How can i make the function create a greeting message with the first and last name and so it returns in an alert box? Thanks
  11. Hey there,I was wondering how at times Wikipedia displays that banner at the top of every page when they want one to be there. I use php inlcudes for my website but I know thats probably not what there using because sometimes there is no banner. I guess another great example would be how YouTube sometimes haves alerts for new things going on at the top. Any thoughts / how to do this would be great!Thanks,Allen Lawson
  12. Hey there,I was wondering how at times Wikipedia displays that banner at the top of every page when they want one to be there. I use php inlcudes for my website but I know thats probably not what there using because sometimes there is no banner. I guess another great example would be how YouTube sometimes haves alerts for new things going on at the top. Any thoughts / how to do this would be great! Thanks, Allen Lawson
  13. Hi I am having trouble understanding how to make Cookies work. i have a fader on a page that you can move. i am justing the jquery.mobile.-1.0.min.jsbut every time i move off this page and come back to it the fader will go back to its default value. I was wondering if there was a way of keeping the value to the same state on return to the page. Help would be grate.
  14. So the basic idea, in the webpage there would be example <span id="Images"></span> and the images should go inside. For example if the count = 0 the image 0.jpg would go inside span. Example2 if the count =1 image 1.jpg would go inside span. Im just asking does this look like it would work? Haven't tested yet. // JavaScript Documentvar count = 0;function image() {var img = document.getlementById("Images").innerHTML='<img src="/includes/images/' && count && '.jpg " width="800" height="600" />';}function nextimage() {count = count + 1;}function previousimage() {if (count = 0) {alert("You are already in beginning of images, you can't go back");} else {count = count -1;}}
  15. Hi, I am a novice at javascript and I am hoping the forum can help me out with a question:Given the following code:var x = 8;var y = x;var x = x+4;alert(y);The result is y=8Meaning, when you change the value of x (after the statement y=x), y doesn't correspond to x anymore.Is it possible to have y change with x all the time- is this doable?I thought in other languages, if you do y=x, it will permanently associate y with x so that every time x changes, so does y.How can this be done in javascript?Thanks
  16. Hi !I customize a Web Framework to use XSL stylesheet on XML and generate HTML 5.I want to report the process (XSL transformation) on the client-side if the client support XSLT.But if the client do not support this operation, I want to process on the server-side and send the generated HTML 5.My problem is : the Javascript function I call on the page works on XML content (ot HTML 5 if the browser does not support XSLT).But I would like to use Javascript on HTML 5 for both cases.So how can I access to the rendered content ? Not on the source content ?Thanks
  17. Hey, I have some problems with a javascript library (http://janne.aukia.com/zoomooz/) i'm using for my website (http://bram-de-leeuw.nl). The problem i'm having is with the zoom function, i added this function to the articles posted on the site but when i click on them it doesn't zoom and in the google chrome console it returns an error saying Uncaught TypeError: Object #<Object> has no method 'initialize' in the jquery.zoomooz.js:294 . But i just followed the examples i got with the library which work fine.. I don't know what to do or were to start fixing this. Another thing i would like to work is a scale function what will scale articles down, the oldest post are the smallest and the newer posts are normal size so there will be a sort of depth, i added the attachment as an example. The lines connecting the posts are connected to the category's of the posts, i don't know were to start here either so if you got any leeds please share! many thanks in advance!
  18. Hello internet.I used a series of password protect html pages to direct the user to a page only if the password is correct. However, it appears they can just type in the web-address of the destination page and it will load. I want that page to be password protected but I can type it in and it will load. How do I prevent this?
  19. I have a question about a little part of a script I am making. The poroblem is that Javascript does the script the in the wrong way, and I don't understand why (and how to solve it). The script has to do this: print starttime, wait three seconds, then print endtime. But what it does is this: wait three seconds, then print starttime and endtime. Thats the wrong way around! How can I make Javascript to write the starttime BEFORE thew loop?????? Thx. --- <html><head><title>test</title></head><body><script type="text/javascript" language="javascript">var run = true;var starttime=new Date().getTime();document.writeln(starttime+"<br />");// why doesn't it do above command, until AFTER below commandwhile (run) { nowtime = new Date().getTime(); if ((nowtime-starttime)>3000) { run = false; document.writeln(nowtime); }; }</script></body></html>
  20. So....i have this series of tabs (visually) and i would like to now if there is a way to refresh their contents everytime i click on them...
  21. Hello internet.Here is my most recent dilemma. I have been creating WebPages without declaring a DOCTYPE. W3Schools forum members corrected that problem I was making. The issue now is that I have gone back and declared a doctype with all my pages and now I am cleaning up the problems. A big problem is getting the window.onload JavaScript function to work. Here is what I am doing, I am declairing this DOCTYPE<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> I am using the following javascript code - Tload is an array I created from mysql database $json = json_encode($rows);echo '<script type="text/javascript">var Tload = '.$json.';</script>';<script type="text/javascript">window.onload = function() {for (var i = 0; i < Tload.length; i++) { document.getElementById(Tload.id).value = Tload.value; } } The array values are not loading to my webpage... Please help.
  22. Randomishlying

    Jquery?

    Is it necessary to have a knowledge of JavaScript before diving into jQuery? It's my impression that jQuery is just a JavaScript library. If that's the case, shouldn't it be just as easy to learn JavaScript that way.To those who have used jQuery, I have a few questions if you don't mind. How does one access the jQuery library? More specifically... How do I know what is in the library so that I can use it (I'm assuming it works this way, but maybe not)? How does jQuery greatly simplify JavaScript programming in your opinion? Any help would be great.
  23. Hey everyone! Happy new year! So I have been working with this toggle function:variable == '' ? '' : ''In simple variable is what your toggling, then you have a parameter and if (if = ?) the second parameter is false (which you want it to be) it will do else (else = the third parameter.Now it works 99% of the time and I am having trouble when I use the img element.This is my code, any help? HTML <!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" lang="en" xml:lang="en"><head><title>Map</title><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /><script type="text/javascript" src="js/buttons.js"></script></head><body><h2>Street View</h2><hr /><a onclick="oiseMap(this)">Interactive Map</a><div class="oiseMap"><img src="http://zeitgeist-toronto.wikispaces.com/file/view/map_oise.png/208416866/map_oise.png" width="700" /></body></html> JavaScript function oiseMap(a) {var element = a.nextSibling;while (element.className != 'oiseMap') {element = element.nextSibling;} element.innerHTML = element.innerHTML == '<img src=\"http://zeitgeist-toronto.wikispaces.com/file/view/map_oise.png/208416866/map_oise.png\" width=\"700\" />' ? '<iframe width=\"700\" height=\"500\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"http://maps.google.ca/maps/ms?msa=0&msid=203146017338240958552.0004b3ca872d9d4e63b8a&ie=UTF8&t=h&vpsrc=6&ll=43.668411,-79.398692&spn=0.002014,0.00375&z=18&iwloc=0004b3ca89be3700fc4f5&output=embed\"></iframe><br /><small>View <a href=\"http://maps.google.ca/maps/ms?msa=0&msid=203146017338240958552.0004b3ca872d9d4e63b8a&ie=UTF8&t=h&vpsrc=6&ll=43.668411,-79.398692&spn=0.002014,0.00375&z=18&iwloc=0004b3ca89be3700fc4f5&source=embed\" style=\"color:#0000FF;text-align:left\">OISE</a> in a larger map</small>' : '<img src=\"http://zeitgeist-toronto.wikispaces.com/file/view/map_oise.png/208416866/map_oise.png\" width=\"700\" />';} My goal is to have the map switch from the iFrame to the image and back, the flip flop. It does not work. It always reloads the iframe... Any ideas? Thanks!
  24. Hi ...I intend to print a table to paper but when I print it using IE, instead of printing the whole row at the next page, the last row breaks into two parts and the contents of it are displayed incompletely. I've tried so many different solutions but none of them worked for me.Here is my code. I want to print the table using JavaScript StringWriter sw = new StringWriter(); HtmlTextWriter hw = new HtmlTextWriter(sw); table.Style[HtmlTextWriterStyle.BorderCollapse] = "collapse"; table.Style["page-break-after"] = "auto"; table.Style["page-break-inside"] = "avoid"; table.Style["display"] = "block"; table.RenderControl(hw); string gridHTML = sw.ToString().Replace("\"", "'") .Replace(System.Environment.NewLine, ""); StringBuilder sb = new StringBuilder(); sb.Append("<script type = 'text/javascript'>"); sb.Append("window.onload = new function(){"); sb.Append("var printWin = window.open('', '', 'right=0"); sb.Append(",top=0,width=1000,height=600,status=0,toolbar=1,scrollbars=1');"); sb.Append("printWin.document.write(\""); sb.Append(gridHTML); sb.Append("\");"); sb.Append("printWin.document.close();"); sb.Append("printWin.focus();"); sb.Append("printWin.print();"); sb.Append("printWin.close();};"); sb.Append("</script>"); ClientScript.RegisterStartupScript(this.GetType(), "GridPrint", sb.ToString()); Thanks
  25. Im quite new at html,php but i have zero clue about javascript...I would like to know how to create a "welcome , name " on the top right of the screen after a successful login...like this forum that shows your name on the top right corner with the sign out button next to it ! i know that the place that will be shown is a matter of css but i have no idea how to do it code wise...A clarification...i dont want the css...i dont know what "happens" after the login in order to do that welcome "area" and how to do it !Thanks ,John
×
×
  • Create New...