JavaScript - I Want To Show Content Form Another Site On Site
I'l not good in Javascript and I can't find anything about what I want.. .
On a sports website there is a table with our ranking and results. On this site the content is changed weekly, but it stays in the same tables.. . Is it possible to make a javascript to get those tables and put them on my own website so the content will change on my site when the content is changed on the sports site? Please help me, it would save me lot of time.. . THx Similar Tutorialsi hope this is the right section to post this in. wasnt sure if this question was client side or server side i have a javascript slideshow that i would like to add to my website. its free to use and it came with some coding when downloaded. my problem is that this is my first time EVER using java (ive fiddled with php tho ) and i cant get the slide show to work on my site. the coding it came with gives you an entire webpage ... i just need the slideshow to go inside a div container instead of being a whole page the following is an embedded style that you can simply copy and paste to notepad, save as an html file, and open in your browser. (im using firefox) all the images etc are already being hosted. so you have to do nothing but open it in your browser to see the script working. like i said, this is the code for an entire webpage ... i just need the slide show by it self in a div container Code: <!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> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>TinySlider - JavaScript Slideshow</title> <style all="media" title="YourConnexx Media" type="text/css"> * {margin:0; padding:0} body {font:12px Verdana,Arial; color:#555; background:#222 url(images/bg.jpg) 50% 0 no-repeat} p {line-height:1.4; margin-bottom:12px} #wrapper {width:578px; margin:75px auto} .sliderbutton {float:left; width:32px; padding-top:134px} .sliderbutton img {cursor:pointer} .sliderbutton img:hover {background:#666} #slider {float:left; position:relative; overflow:auto; width:500px; height:300px; border:2px solid #fff; background:#fff} #slider ul {position:absolute; list-style:none; top:0; left:0} #slider li {float:left; width:500px; height:300px; padding-right:10px} .pagination {float:left; list-style:none; height:25px; margin:15px 0 0 32px} .pagination li {float:left; cursor:pointer; padding:5px 8px; background:#666; border:1px solid #999; margin:0 4px 0 0; text-align:center; color:#222} .pagination li:hover {background:#777; border:1px solid #bbb; color:#000} li.current {border:1px solid #ccc; background:#888} li#content {width:464px; height:270px; padding:15px 28px 15px 18px} #content h1 {font:22px Georgia,Verdana; margin-bottom:15px; color:#036} </style> <script type="text/javascript" src="script.js"></script> </head> <body> <div id="wrapper"> <div> <div class="sliderbutton"><img src="images/left.gif" width="32" height="38" alt="Previous" onclick="slideshow.move(-1)" /></div> <div id="slider"> <ul> <li id="content"> <h1>TinySlider - Simple JavaScript Slideshow</h1> <p>This super lightweight (1.5 KB) sliding JavaScript slideshow script can easily be customized to integrate with any website through CSS. You can add any content to it, not just images, and it gracefully degrades without JavaScript support. The script supports automatic rotation with the option to auto-resume, an active class on a navigation list if applicable, and a direction toggle (vertical or horizontal).</p> <p><em>For complete details visit <a href="http://www.leigeber.com/">leigeber.com</a>.</em></p> </li> <li><img src="photos/sea-turtle.jpg" width="500" height="300" alt="Sea turtle" /></li> <li><img src="photos/coral-reef.jpg" width="500" height="300" alt="Coral Reef" /></li> <li><img src="photos/blue-fish.jpg" width="500" height="300" alt="Blue Fish" /></li> </ul> </div> <div class="sliderbutton"><img src="images/right.gif" width="32" height="38" alt="Next" onclick="slideshow.move(1)" /></div> </div> <ul id="pagination" class="pagination"> <li onclick="slideshow.pos(0)">1</li> <li onclick="slideshow.pos(1)">2</li> <li onclick="slideshow.pos(2)">3</li> <li onclick="slideshow.pos(3)">4</li> </ul> </div> <script type="text/javascript"> var slideshow=new TINY.slider.slide('slideshow',{ id:'slider', auto:3, resume:true, vertical:false, navid:'pagination', activeclass:'current', position:0 }); </script> </body> </html> please show me what i need to get this slide show into a div container by it self. when i do it it doesnt work at all. it appears in the div container as a text area or something but it doesnt work at all. just shows the first slide and nothing else You've all seen it before banner codes/rss feed displayers/twitter feeds/etc etc all you do is copy and paste a <script src="http://somewebserver/display.js"></script> somewhere on your website and it retrieves the html from the remote server and displays it on your site. My question as simple as it sounds is how the hell does this stuff work? I have a back end php page that pulls the required information from my DB based off a userid passed to it ie: mywebserver.com/display.php?id=xxxx Is the javascript just a simple ajax call to my php page passing straight on the userid passed to it or is there something more complex to it? I was always under the impression you couldn't do remote ajax calls to a page on a different server, which if I get this right a script off my server included on another domain becomes a member script of that domain and not my own? How can i make counter for my site that will alert how many visitors had been before every new Visiting? <script type="text/javascript" > function counter(incrimentbyone){ // IF i make var i=0 everytime alert will be 1 and like this alert is "NaN" var i=i+incrimentbyone; alert(i); } </script> <body onLoad="counter(1)"> Hello, I have very little knowledge of javascript, other than modifying existing scripts, and I can't find anything about this particular problem. I need some help on creating a simple script that will display a div ONLY if the user comes from a certain page within the same site. Not sure if that was clear, but let me try with specifics. There is a link to a page called 'Clients' on the 'About Us' page. If a user goes directly to 'Clients', they should have a normal experience. If, however, they come via the 'About Us' page, I want to display a div at the bottom of the page that will take them back to the 'About Us' page. I know how to get a referrer, and I know how to show/hide divs. I just don't know how to combine the two. Can anyone help? I've got no knowledge/experience of javascript, but i'm pretty competent with html and css. I've put together a site for my University radio statio, and i'd like to have a section that displays the show name thats broadcasting at the time. Can anyone point me towards a script, or tutorial, that might help me out? Thanks in advance! I have two effects, one is a fadein effect and one is a smooth scrolling effect. I also have a simple image slider but that isn't the problem. It doesn't seem like the fadein is the problem either because when I had non-scrolling (positioned absolute) content "fadein", it wouldn't fadein in IE but at least it showed up, whereas the main content is blocked in IE with a dialogue about not running scripts or activex. Is there a way to overwrite this? I tried running the basic example of smooth scrolling in IE9 and it worked fine without being blocked. My code seems the same! I would be ok with the content just not fading in when using IE9, but if a user doesn't know to enable activex scripts from the dialogue box (assuming they even get a dialogue box), they won't be able to read any of the content which is an issue. Here's the JavaScript in the head section: Code: <script type="text/javascript" src="jquery.js"></script> <script> function goToByScroll(id){ $('html,body').animate({scrollTop: $("#"+id).offset().top},'slow');} </script> <link href="template.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="slider.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("#slider").easySlider({ auto: true, continuous: true }); }); </script> <link href="slider2.css" rel="stylesheet" type="text/css" media="screen" /> <script> function fadein(){var fade=0,fadein=document.getElementById("fadein").style,ms=(fadein.opacity==0)?0:1,pace=setInterval(Fade,40);function Fade(){if(fade<100){fade+=2;if(ms)fadein.filter="alpha(opacity="+fade+")";else fadein.opacity=(fade/100)}else clearInterval(pace)}}; window.onload=fadein; </script> </head> Can anyone tell me how I can change the code below so that instead of all the fade in fade out stuff the function will actually replace whatever is inside a div called Myholder with the response this script pulls in? Here's the code I need to change. <script type="text/javascript"> $(document).ready(function() { $('#wait_1').hide(); $('#drop_1').change(function(){ $('#wait_1').show(); $('#result_1').hide(); $.get("func.php", { func: "drop_1", drop_var: $('#drop_1').val() }, function(response){ $('#result_1').fadeOut(); setTimeout("finishAjax('result_1', '"+escape(response)+"')", 400); }); return false; }); }); function finishAjax(id, response) { $('#wait_1').hide(); $('#'+id).html(unescape(response)); $('#'+id).fadeIn(); } </script> drop_1 is the name of a drop down which when changed runs this script which brings back a second dropdown with data relating to the first one. If I need to post more info to get some help with this please let me know. Thanks in advance. http://phplist.xxmn.com/menu.html When the mouse hover on the navigation (cpanel). it shows the corresponding content under it. but i can't click the link in it. is there a way to get it.i know it will be using setTimeout. but i don't know how to do. thank you. when i change the top value small.but under IE7 and IE6.i still can't click the link in the showing content. Hey there i dunno if i should post on this section but well, i'm creating a website and i want to stream nba games. I found this site http://www.nbaliveonline.com/streaming/ wich usually stream games, and i want to use their streams on my site, i would like to know if its possible and how i can do it by copying any code or something, is there any way to do it ? Basicly i just want their video player streaming games into my site... thanks First off please forgive my ignorance, as I am very new to coding. I hope that I have posted this in the right place. I found a great piece of code that I would like to use for my site search. I found it he http://www.javascriptkit.com/script/...e_search.shtml Here is what I am attempting to do. I would like this piece of code to search all three of my domains, if this is possible. I would like to use this search box on all three of my websites, if this is possible. If you look at this site: www.kennedyassassinationresearch.com I would like to keep the look similar to what it is now, and use this code in the upper right corner of the header, where the black search box is now. Is any of this possible? the code I located is: Code: <form name="jksearch" action="http://www.google.com/search" method="get" onSubmit="jksitesearch(this)"> <p>Search JavaScript Kit:<br /> <input id="hiddenquery" type="hidden" name="q" /> <input name="qfront" type="text" style="width: 200px" value="navigator object" /> <input type="submit" value="Search" /><br /> <div style="font: bold 11px Verdana;">Google:<input name="se" type="radio" checked> *Yahoo:<input name="se" type="radio"> *MSN:<input name="se" type="radio"> </div> <script type="text/javascript"> // All-in-one Internal Site Search script- By JavaScriptKit.com (http://www.javascriptkit.com) // For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/ // This notice must stay intact for use //Enter domain of site to search. var domainroot="www.javascriptkit.com" var searchaction=[ //form action for the 3 search engines "http://www.google.com/search", "http://search.yahoo.com/search", "http://search.msn.com/results.aspx" ] var queryfieldname=["q","p","q"] //name of hidden query form for the 3 search engines function switchaction(cur, index){ cur.form.action=searchaction[index] document.getElementById("hiddenquery").name=queryfieldname[index] } function jksitesearch(curobj){ for (i=0; i< document.jksearch.se.length; i++){ //loop through radio to see which is checked if (document.jksearch.se[i].checked==true) switchaction(document.jksearch.se[i], i) } document.getElementById("hiddenquery").value="site:"+domainroot+" "+curobj.qfront.value } </script> </p> </form> <p style="font: normal 11px Arial">This free script provided by<br /> <a href="http://www.javascriptkit.com">JavaScript Kit</a></p> Any help is greatly appreciated, as this is a learning experience for me, and this has me quite confused. Thanks! I'm sorry I don't have code for this one. I'm making a fansite for a game called RuneScape and I'm a bit stuck on this part. What I need for my website is, a page that will have the prices (min, middle, and max) of things from this or other items, which will be chosen later on. Here are two example sites that I am wanting to ... do the same thing as them. First Example Second Example I'd really appreciate any information you guys are willing to give. Thanks. I'm usually pretty good with finding codes on my own, but it's been a while and I'm pretty stumped. I am currently working on a new site, and making a new layout. So on Photoshop, I laid out how I want it to work: This is how it will look: Each section of the header, like each color/shape, will be a separate imagemap. When it is hovered upon, An arrow will move out of the color/shape, and then whatever the link will lead to will appear at the end: And when the arrow is taken off of it, it will retract back to the color/shape, not just disappear. And here's a picture of all the arrows out: Is this possible? And is it possible that the bar&arrow that come out to also be clickable? And the text at the end to be clickable text and not just an image? Any tutorials/website links are welcome, I can usually follow them pretty well. Sorry to bombard you, I just figured I'd ask everything I wanted to in one thread. hey man,i write this code , Code: <html> <head> <script type="text/javascript"> function Do() { winow.location.assign("http://www.google.com"); } </script> <script type="text/javascript"> function replaceDoc() { window.location.replace("http://www.w3schools.com") } </script> </head> <body> <input type="button" value="Google" onclick="Do()" /> <input type="button" value="Replace document" onclick="replaceDoc()" /> </body> </html> i want to see if i click Google button I need to have a new window or tab to open for the random image w/link script found here http://javascriptkit.com/script/cut144.shtml I have tried target=blank but that doesn't work. Your help would be appreciated. Thank you hi at the first Sorry for my bad english. I have a joomla at the wrap5.5 framework I knew my frame work for Regulation module position height have a js function. this function is ok in IE5 & ff but in IE9 show very tall my module height. but i dont know what is wrong on this function . i dont know anything about JS. this function : Code: (function(e) { e.fn.matchHeight = function(f) { var a = 0; this.each(function() { a = Math.max(a, e(this).outerHeight()) }); f && (a = Math.max(a, f)); return this.each(function() { var c = e(this), b = c.outerHeight() - c.height(); c.css("min-height", a - b + "px") }) } my website:http://www.joomi.ir Hello, can make recommendations that it is necessary to finish in this site, I see that that that doesn't suffice but I will not understand that, to you I will be very grateful for your answers Here a site http://iceroos.ru I want to make a menu like this web site :http://www.petrobras.com.br/pt/ When your move the cursor on it , a new windows open and there is a picture in left side and submenues in right side I myself think it is a jquery tool but I don't know how to make some thing like this How can I do so ? thanks Hello everyone, I am very curious, how are the scroll bars disabled on this web-site: http://www.nofrks.com/# I know how to disable scroll bars in a new window with Javascript, but how would I disable scroll bars on the web-site? Could someone please give me an idea? Thank you very much display text depending dropdown Hey! I am creating a new function for my website which will make it very nice I believe. But since I am no good at javascript I have got quite stuck here but I don't think it's that hard afterall. Actually I'm not completely sure if javascript is needed but please lead me in the right direction here, I'm lost. What I want to make is depending what checkboxes the visitor choose and then click "Search" he will get a certain result which is categoried under these checkboxes. I don't know what else to say but I hope you get an idea of what I mean, if not please ask and I'll try explain it better. Thankful for your help I want to place a Logo/ad in front of content, there are ways to do it but the problem with them is that they use JS show/hide method. What happens is that the content doesn't load while user is watching the logo/ad, which results as double waiting for the user first for the logo/ad and then the actual flash content loading. So I was thinking if there is a way that a logo/ad could be displayed and at the same time flash content continues to load at the back end. *I didn't ask for a loader that continues to appear until at the back end flash content is done loading, because I found only one script that was able to do so using Jquery but it was designed to work with fixed pixels while my flash content is based on %ages* Live Demo: http://bloghutsbeta.blogspot.com/201...ent-issue.html Note: Sorry for providing blogspot link but JsFiddle is not an option for a person living in Afghanistan with 5KBps but still if you feel that I am missing something please let me know I will edit it and try my best to provide as relevant question as possible ^^ Relevant Markup: Button for lightbox or Modal Window Code: <a class="poplight" href="#?w=100%" rel="popup_name"><img alt="play game" class="happybutton" onmouseout="this.style.opacity=0.8;this.filters.alpha.opacity=80" onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100" src="http://farm5.static.flickr.com/4084/4998558471_27e3985c16_m.jpg" style="opacity: 0.8;" /></a> Code: <div class="popup_block" id="popup_name"> <script type="text/javascript"> $(document).ready(function(){ $('a.poplight[href^=#]').click(function() { $('<iframe/>') .attr('frameborder', 0) .attr('allowTransparency', false) .attr('scrolling', 'no') .attr('width', '100%') .attr('height', '98%') .attr('src', 'http://files.cryoffalcon.com/bhgames/dressup/Celebrities/Wizard%20Fashion.html') .appendTo('#popup_name'); }); }); </script> </div> CSS: Code: #fade { display: none; background: #000; position: fixed; left: 0; top: 0; width: 100%; height: 100%; opacity: .80; z-index: 9999999; } .popup_block{ width: 98.95%; height: 98.2%; display: none; padding: 0px; line-height:1em; font-size: 1em; position: fixed; top: 0px; left: 0px; z-index: 999999999; -webkit-box-shadow: 0px 0px 20px #000; -moz-box-shadow: 0px 0px 20px #000; box-shadow: 0px 0px 20px #000; -webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px; } .close { height:20px; float: right; margin: 0 2px 0 0; } JS (actually Jquery) Code: <script type="text/javascript"> $(document).ready(function(){ //When you click on a link with class of poplight and the href starts with a # $('a.poplight[href^=#]').click(function() { var popID = $(this).attr('rel'); //Get Popup Name var popURL = $(this).attr('href'); //Get Popup href to define size //Pull Query & Variables from href URL var query= popURL.split('?'); var dim= query[1].split('&'); var popWidth = dim[0].split('=')[1]; //Gets the first query string value //Fade in the Popup and add close button $('#' + popID).fadeIn().css({ 'width': Number( popWidth ) }).prepend('<a href="#" title="Close It" class="close"><img src="http://files.cryoffalcon.com/bloghuts/images/close%20button.png" alt="Close" width="20" height="20" /></a>'); //Define margin for center alignment (vertical + horizontal) - we add 80 to the height/width to accomodate for the padding + border width defined in the css var popMargTop = ($('#' + popID).height() + 0) / 0; var popMargLeft = ($('#' + popID).width() + 0) / 0; //Apply Margin to Popup $('#' + popID).css({ 'margin-top' : -popMargTop, 'margin-left' : -popMargLeft }); //Fade in Background $('body').append('<div id="fade"></div>'); //Add the fade layer to bottom of the body tag. $('#fade').css({'filter' : 'alpha(opacity=80)'}).fadeIn(); //Fade in the fade layer return false; }); //Close Popups and Fade Layer $('a.close, #fade').live('click', function() { //When clicking on the close or fade layer... $('#fade , .popup_block').fadeOut(function() { $('#fade, a.close').remove(); }); //fade them both out return false; }); }); </script> |