JavaScript - Need Help In Api Call
Hello all,
I am a newbie to api and I want to bring job website into my site using that job website's api. They provide calling url to the xml api to get response. But I dont to know how to get response through javascript. Can you please help me to call that api through javascript or java? Hope that it is simple to you. Thanks in advance... Similar TutorialsHi, I am hoping I just need to be pointed in the right direction with this. I have Page1. When Page1 body onloads it uses Ajax to call PartA Within PartA I have a message board so members can write messages which will be sent to my database in PartA[1] and immediately posted for view on to PartA[2]. As I want to have my request to the server updating regularly I want to have PartA[2] on a timed loop to refresh - I do not need the content of PartA[1] to refresh. So the order of events would look like this: Page1 | onload call | v PartA / \ V V PartA[1] PartA[2] (loads once) (constantly refreshes) What I am not sure about is that I have <body> and <head> attributes in Page1 only. I have already used my body onload to call PartA (and can't use it to call PartA[2] before PartA has loaded anyway). I do not want the user to have to click a button or do anything to call up PartA[2]. So my question is how would I get PartA[2] to automatically load within PartA? I hope I have made this clear, but if I haven't let me know and I will try again. Right for day's i've searching for a jQuery/js/ajax script that opens like facebooks box where you can delete things update posts and so on... But i don't want that facebox thing i want a tut where i can buy things that will insert into the database and delete things and sooo on... I've made the box i just want the script for it.... I'm not good with js/jQuery/ajax.... Thanks. I'm trying to implement this 'ajax' script, however i'm getting the following error: function expected line 25. And I'm not the only person who is getting this error message :S How can the code be altered so it will work? Also the script isn't executed when I change onclick in onload :S How come and how can I change it so that it will be executed on launch? http://chriscook.me/web-development/...icking-a-link/ My problem is that I am trying to call an function within an SWF. Now, I already know how to setup my SWF and that isn't the problem. The problem is that when I try to call the function using Javascript, I am told that the function doesn't exist. I'll show you the code right here. Code: function AudioPlayerEmbed( e ) { if ( e.success ) { e.ref.LoadAudio( 'http://therevolve.com/upload/userfiles/Music/Alec_Smith1.mp3' ); } } swfobject.embedSWF("player/MP3Player.swf", "flash", "300", "90", "9.0.0", "player/expressInstall.swf", null, null, null, AudioPlayerEmbed ); HOWEVER, when I put some alert before the call, it happens to work. What is going on? Code: function AudioPlayerEmbed( e ) { alert("A"); if ( e.success ) { e.ref.LoadAudio( 'http://therevolve.com/upload/userfiles/Music/Alec_Smith1.mp3' ); } } swfobject.embedSWF("player/MP3Player.swf", "flash", "300", "90", "9.0.0", "player/expressInstall.swf", null, null, null, AudioPlayerEmbed ); Here is a live example. Any help would be appreciated. If you need more information, I can provide it. Hello. Started my massive JavaScript career just yesterday and the forums I frequent still lack a proper BB-code hide-tag, so I figured I'd try make it in JavaScript, since HTML is allowed on there. This is what I did: Code: <script type="text/javascript"> function show() { document.getElementById('silHideTextTag').innerHTML='Hidden text!!'; document.getElementById('silHideTextBtn').value='Hide'; document.getElementById('silHideTextBtn').onclick='hide()'; } function hide() { document.getElementById('silHideTextTag').innerHTML=' '; document.getElementById('silHideTextBtn').value='Show'; document.getElementById('silHideTextBtn').onclick='show()'; } </script> <input type='button' id='silHideTextBtn' onclick='show()' value='Show'/> <div id='silHideTextTag'> </div> The button labelled "Show" appears fine, when I click it it becomes "Hide" and the text "Hidden text!!" is shown. However, when I click the button again, nothing happens at all. I don't quite understand where the problem is. Thanks in advance for any clues. Best regards, Zyl hi i'm trying to call a web service from java script code stored NOT in Html but in an extenarl file .js. My code is this: service.useService("http://localhost:10000/WebS_cod_01/WebS_codEurService.asmx?wsdl", "WebS"); Photo = service.WebS.callService("webS_codEurProcessWS" , photoID); checking with Firebug i find this message: "service is not defined" where i'm wrong ? thanks in advance Hello, if in a webpage is included a javascript file (for example code.js) can I from my browser call a function contained in code.js and will it works correctly? I'm not meaning that the function is called in the page with or without a link to click, but it is only in code.js! Thank you! http://www.zooprinting.com/welcome the section with 5 things that rotate starts with "free design online" i need to make an element like that on my site, and i'm pretty handy at googling until i find the script i'm looking for and making it work, but i can't figure out what in the world to call that. it's commonly used but i just can't seem to get my search terms right. anyone know where i can find said script? hihi i am doing a project regarding ajax how am i going to call the title because normally if you call start year is like var detail = eval.... then for loop it inside should be var start year="" startyear += ...[i].startyear something like this but how am i going to call the title inside the note? Code: { "infos": { "info": [ { "startYear": "1900", "endYear": "1930", "timeZoneDesc": "daweerrewereopreproewropewredfkfdufssfsfsfsfrerewrBlahhhhh..", "timeZoneID": "1", "note": { "notes": [ { "id": "1", "title": "Mmm" }, { "id": "2", "title": "Wmm" }, { "id": "3", "title": "Smm" } ] }, "links": [ { "id": "1", "title": "Red House", "url": "http://infopedia.nl.sg/articles/SIP_611_2004-12-24.html" }, { "id": "2", "title": "Joo Chiat", "url": "http://www.the-inncrowd.com/joochiat.htm" }, { "id": "3", "title": "Bake", "url": "https://thelongnwindingroad.wordpress.com/tag/red-house-bakery" } ] } Hello, I am trying to use a for loop to call images of custom text. For example, I have images named uppera.png and lowera.png for a custom font. I need the image of the letter to show up as they type into a text area, but also have backspace work correctly to delete the last image added. Here is the code I have thus far: <script type="text/javascript"> function callimage() { var chars = document.getElementById('userinput').value.split(""); for (i=0; i < chars.length; i++) { if (chars[i] == "A") { var image = "uppera.png"; } if (chars[i] == "a") { var image = "lowera.png"; } ... if (chars[i] == "9") { var image = "9.png"; } document.getElementById('visual').innerHTML = document.getElementById('visual').innerHTML + '<img src="' + image + '"/>'; } } </script> <input type="text" maxlength="20" id="userinput" onkeyup="callimage()"/> <p id="visual"> </p> When I test this out it takes the previously entered text and adds it to the new text and combines them. For instance if you entered "a" it would show up as "a"; if you entered "a" again it would show up as "aaa" and then "aaaaaa" and so on. Also, it will add the existing characters again if any key is pressed, like just shift. I think I would need to write an else statement to fix that part, but I don't know what to put there, either. Any ideas on how I could fix this one? Thanks! <frameset rows="30%,70%> <frame src="page1.html" name="name1" frameborder="0"></frame> <frame src="page2.html" name="name2" frameborder="0"></frame> </frameset> in above code I used page1.html & page2.html as frame. Both include same javascript file having two function name fun1() & fun2(). as both are separate frame both have there own copy function page1.html fun1() fun2() page2.html fun1() fun2() I call fun2() from page2.html and inside that function I want to call page1.html's fun1(). fun1() in page1.html and fun1() in page2.html both return different result because of there global variables. Is there any way to call fun1()-page1.html from the fun2()-page2.html? Hi, The Problem I get a error message only in IE when ever I try to call a function from an external file. I am using jQuery if that makes any difference and various plugins. Quote: Error: The value of the property '<function name>' is null or undefined, not a Function object. All the call work fine in FF, chrome, safari etc but for some reason I just can't get it to work with IE. This is getting annoying now, i have no idea what is causing it. here is an example: admin.js Code: function create_cleditor_admin_form(textarea_object) { $(textarea_object).cleditor({ height: 120, controls: // controls to add to the toolbar "bold italic underline | color highlight removeformat | bullets numbering | alignleft center alignright justify | undo redo | ", useCSS: false }); } calling code Code: $(document).ready(function() { try { create_cleditor_admin_form('textarea'); } catch(e) { alert("Error: "+e.message); } }); I have tried searching for this error on google and came up empty handed, surely it just something very stupid. Thanks in advance How do I call this popup from a .js file?? Here is my popup code <script type="text/javascript" src="fad.js"></script> <link rel="stylesheet" type="text/css" href="fad.css" /> </head> <body> <div id="fa"> <div class="fa_close"><a href="#" onclick="hFa()"><img src="close1.jpg" /></a></div> <h1><i>THIS WEEK'S</i></h1> <img src="special.jpg" alt="special" /> </div> From html I would call it using: <script type="text/javascript">sFa();</script> How do I activate this popup from a .js file I am relatively new to JavaScript so am still learning. I have a page I would like to call a function when it loads but not sure how to do this. The function is http://tickettransaction.com/?bid=20...ults&venid=101 and should function similar to this page when loads http://paviliondallas.com/ I could get that with html but not sure how to auto load to render ths list from the provided plugin. Another example is http://www.justbuytickets.com/Venues...FcY32godDU-hzw Any help would be appreciated. Thanks in advance. When calling a javascript file I have written <script type = "javascript" src = "mycode_2010.js"> However, I would like to replace 2010 with a variable so that for example I can detect the year and load the appropriate code e.g. mycode_2011.js rather than writing a new hard coded html page. Is it possible please? Hi In C# I would attach the service reference http://www.anotherdomain.com/Service1.svc?wsdl then write myService MS = new myservice(); string[] s = MS.GetDates(); //return an array of string dates BUT can this be done with only Javascript/Jquery , where the service is on a different domain? Can you please tell me how or point me in the right direction Thanks for the help hey there. the script im trying to write is used to take the values from four separate forms and display an image based on the highest value. it looks like this. Code: <script type="text/javascript"> var val = Math.abs(document.getElementById("mytext1").value); var val2 = Math.abs(document.getElementById("mytext2").value); var val3 etc var val 4 etc var showImg = document.getElementById("image1").src = "default.jpg" document.getElementById("image1").src = "default.jpg" // check + values for right sph if (val >= .25 && val <= 3.5) {document.getElementById("image1").src = "r39.gif"} if (val >= 3.75 && val <= 5.50) {document.getElementById("image1").src = "pol.gif"} // check - values for right cy if (val <= -.25 && val >= -3.5) {document.getElementById("image1").src = "r39.gif"} if (val <= -3.75 && val >= -5.5) {document.getElementById("image1").src = "pol.gif"} // check + values for left sph if (val2 >= .25 && val2 <= 3.5) {document.getElementById("image1").src = "r39.gif"} if (val2 >= 3.75 && val2 <= 5.50) {document.getElementById("image1").src = "pol.gif"} // check - values for left cy if (val2 <= -.25 && val2 >= -3.5) {document.getElementById("image1").src = "r39.gif"} if (val2 <= -3.75 && val2 >= -5.5) {document.getElementById("image1").src = "pol.gif"} etc etc } </script> <input type = "text" id = "mytext1" > <input type = "text" id = "mytext2" /> <input type = "text" id = "mytext3" > <input type = "text" id = "mytext4" > <img src="calculate.gif" onclick="showImg()"> anybody know how i go about getting the highest value checked and the resulting image displayed. thanks in advance. i have been tryin for a long time to get both of the javascripts(for the thumbnail to main img swap and the navigational arrow swap) to work in synch http://***.com/nn.html it needs to be so that after clicking on a thumbnail then on an arrow, the correct image in the correct order appears. as of now they are running separately and one has no influence on the other. forgive me if im not being clear. i keep trying to replace the id that one script is looking for with the same id from the other but this will not work..why? please help me...believe me ive tried to help myself by reading all i can understand on the web about this but im in the dark thanks |