JavaScript - Pages .html
Hi,
I know lot of scripts written by experts in JS that extracts urls from source code placed into DIV or TEXTAREA, but I would need just one to extract the links ending by ".html" or ".htm" or ".txt". I would appreciate any helpful. Just he! Similar TutorialsI have an array that has user accounts and need to pass it to another page. How can i do this? My teacher said we can only use html and javascript.
I have about 100 pages of HTML, and I want to only have to put in the specific data once. My Javascript is rusty and I am on a short fuse, unfortunately, so some help would be appreciated. All pages have one picture with URL path to the image, an initial width, and a title string. I would like to define these once in a Javascript etc, and have a script plug those values into the page Title, the width of the pic <img> tag, the URL of the src of the pic, and a text title in the body (above the pic) of the page. -- I think I need <body onload="mySetup('myTitle string', picWidth, '<picURL>')> then in the script I would need: window.title = myTitle; bodyText.innerHTML = myTitle; myPic.width = picWidth; myPic.src = picURL; myPic.alt = myTitle; then <img id="myPic" onclick="myClickHandler( )"> --------------- But messing about with this has not gotten me a working page. Would some kind person help out? Thanks! Basically what I need to do is cause a bit of HTML to only display on a specific page. I have figured out how to do most of the work i.e. figuring out what page that the code is being displayed on, etc. However, for some reason the DOM element that I am using will not update based on the Javascript. I have searched the Internet for a solution and unfortunately I have found none. Here is the version of the code that I am currently working on: Code: <html> <head> <script type="text/javascript"> window.onload = function DisplayButton() { var DesiredPage = 'Page to Display'; //Page that I want the code to display on var sPath = window.location.pathname; var sPage = sPath.substring(sPath.lastIndexOf('/') + 1); //This determines and places in a variable what page that the code will be on if (sPage == DesiredPage) { document.getElementById('HiddenCode').style.display = "block"; } } </script> <p Id="HiddenCode" style="display:none">Code only to be displayed on indicated page</p> </head> </html> I am somewhat new to Javascript so I feel like I might be missing something obvious here. Thank You to anyone who can help. Zbot Hi, I coded the following JavaScript: Code: var el = document.createElement("iframe"); el.setAttribute('id', 'ifrm'); document.body.appendChild(el); el.setAttribute('height', 250); el.setAttribute('width', 300); el.setAttribute('frameborder', 0); el.setAttribute('marginheight', 0); el.setAttribute('marginwidth', 0) el.setAttribute('src', 'http://example.com/?pub=1&format=image&size=300x250&url='+window.location); And am putting it between <script type="text/javascript"> and </script> tags in the <body> section of my site. But, it only works in certain areas of the page. Can you guys think of any reason for this? Let me know... Thanks, ~Christian Hi, I'm in year 11 studying GCSE Computing and I'm working on gathering some primary research for a project. I'd be really grateful if someone with experience in web developing would be able to explain to me some of the uses of JavaScript within web pages- what have you used it for specifically? Also, any examples of how JavaScript is used outside of web pages would be really helpful. Thank you! Hi Forum, to develop a "Digital Signage" applikation we need: 1) After loading the (main) html page get all the pages (.html, .pdf, .xls, .jpg) as members of the paylist. - Is there a way to get the appr. 15 pages into the browser (as DOM Objects) ? Or rather to load in 15 iFrames ? 2) The mentionde pages should be displayed in a certain order (in ca. 20 sec tact). - A possible solution would be to hide / unhide. Any other wy ? Thanks in advance Michel How would you connect a HTML page wig a JavaScript page so a person could not reed JavaScript but it would still work.
how do i make something like this? so that instead of viewing a long list it will be divided into pages..? 1. Go to drugstore.com 2. click on "international link" at the right hand top corner 3. An over lay appears where you can select country and currency drop down is auto filled. 4. Click on Update country & currency button updates the site for that country and 5. Click on Proceed as US customer updates site for US customer. 1. Go to drugstore.com 2. Click on any tab like hair care and add a product to bag 3. Click on international link at the right hand top corner 4. An over lay appears where you can select country and currency drop down is auto filled. 5. Click on Update country & currency button does not update the country on the website. Any help is very much appreciated. Thanks in advance!! Hi, I want to redirect pages e,g 'http://mydomain.com/pagename.html' to 'http://www.mydomain.com/pagename.html",i.e if anyone access without www then it will be added automatically,how can i do this using javascript? plz help Thanks I've been searching the net for a few hours now for a js that i can use <a href="http://www.sitename.com/#content/home">Home</a> load into a div, but i cant seem to find one, anyone got any ideas? or good links to any. Thanks. Hi All, I am trying to create a website and am having problems editing a piece of code. A working example can be seen Here The only problem is that the "pages" are open when a user arrives on the site and I want them to be " closed" until a user clicks them, much like the "Search, Profile & Draw" tabs. I have included all the coding used to this, the only thing I haven't included are the images. Anyone got any idea how this is possible? Regards Jake m using Jquery - isotope from http://isotope.metafizzy.co/ i noticed that the linking to a specific category is not possible since it filters using “data-filter” The links a PHP Code: <a href="#" data-filter="*" >all</a> <a href="#" data-filter=".logo" >logo</a> <a href="#" data-filter=".design" >design</a> i tried using linking like this below but it didn't work: PHP Code: <a href="portfolio.html#filter=logo" data-filter=".logo">logo</a> can anyone see if there’s a possibility to link to the “design” or "logo" category from another page? so that it would be already filtered when the user reaches the page. Hi guys, i have posted this problem yesterday but maybe it just wasnt clear enough on what i wanted to acheiv. basically i have 1 link throughout my site and its a "buy now" button. i want it to be able to fetch possibly a value out my page content and then depending on that content direct the user to the correct page when they click that button? is this feasible? cheers, ant. Hi all, I'd like to insert an image with fixed position in all https pages. Is it possible? How? Thank you very much hi, im new to the html and javascript stuff and am coding my own site, and currently stuck. hope someone can help! for my website layout, i want to have 4-5 buttons on the left side for the different links, and on the right half i want to load that link without reloading the entire webpage. currently i have it so that everything is in tables, so table's left column contains the links (for example - Link1, Link2, Link3, Link4, Link5). now when i were to click any of those i want the page corresponding to that link to open up in the right column without reloading the entire page. i'm stuck on how to pass what i click on the left to load up on the right. any help would be nice! thanks 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? Good day Lets say I have a page with 3 thumbnails and one big div. When click in one of the thumbnails the image of it must appear inside the big div. Of course there are 3 images (little ones for the thumbnails) and 3 big images for the real size ones. Script this is simple for me but imposible if I have more than 100 pages within 6 images inside them (3 little and 3 real size for 3 thumnail divs and one single big div). There must be some kind of order to just script the divs of the thumbnail divs and the real size image div in all the pages at ones, otherwise I have to creat ID's to every single div inside every single page! (4 id's to one page and I have more than 100 pages!, this is inpractical because is posible that in the future the pics change, is more than 400 id's) For example: for FIRST.html big div (div id="img001bg") thumb1 div (div id="th_img001" thumb2 div (div id="th_img002" thumb3 div (div id="th_img003" SECOND.html THIRD.html ... HUNDRED.html ... ! There must be some solution using somehow the functions, please help! Thank you to all |