JavaScript - Please Help Me With A Javascript Boolean Function.
Hello. If the function called Change has ever been called, the function in window onload is to not be executed. This is what I have so far, but I am sure it's wrong or missing something. I tried to confirm the results with document.write or alert but am having trouble doing so.
Code: window.onload=function(){ if (calledAtLeastOnce == false) { Change('big', 'http://www.adomainname.com/image.jpg'); } } function Change(id,src,w,h){ var calledAtLeastOnce = true; } Similar TutorialsHi, I am very new to javascript and html. I am trying to create a function which will hide or show a div (div1). Right now, it is always showing the div whether the boolean value is true or false. I know that it is getting inside the else if part, but it doesn't seem to be working. Code: <script type="text/javascript"> function hideDiv(flag) { if (flag == false) { document.getElementById('div1').style.visibility="visible"; } else if (flag == true) { document.getElementById(div1).style.visibility="hidden"; } } var bool = new Boolean(true) hideDiv(bool); </script> <body> <div id="div1"> Text! </div> </body> Thank you for taking a look I am about to translate some C++ code to JavaScript. In C++, it is straightforward to declare and use a Boolean variable; all I do is swap it between true and false and back again as needed. For example, Code: // C++ Code . . . bool na = 1; . . . na = !na; . . . I am wondering if JavaScript offers boolean variables. As far as I know, it does not, but I thought I would confirm by asking around. At the moment, I am planning to code the comparable block in Javascript using an "if" statement or a ternary operation. For example, Code: JavaScript Code . . . var na = 1; // Option 1 if (na) na = 0; else na = 1; // Option 2 na = ((na) ? 0 : 1); . . . Is one of these options recommended as the best way to simulate a boolean variable and operation? (I would like the fastest-executing code possible.) Or is there another--better--way to do it? All advice and recommendations appreciated. Thank-you in advance. Hi, I am facing a problem in passing replace() function as an argument in user defined java function, can any one help me how to resolve it? intention is to pass a file path to my user defined function, but before passing the path i want to replace the character '\' to '\\' I am posting my javascript function he <a href="#" onclick="OpenDocPreview('<%# Eval("PATH")%>'.replace(/\\/g,"\\\\"), '<%# Eval("Filename")%>')"><%# Eval("DocTitle") %></a> function OpenDocPreview(url, docname) { alert('message from search base : ' + url + ' ' + docname); } thank you, I made a mouseover event of a caption on a picture, when I hover the opacity of the background color of the hover and the text goes down. What I want is that when I hover over the image which the caption is floating on, the onmouseover event gets activite. For an imaginary example: Code: function unhighlight(x) { x.style.backgroundColor="transparent" } Function ActivationFuction() { activate.function="unhighlight" } thanks How can I call a PHP Function inside a Javascript Function? This is what I have so far, but I don't think I'm doing it the right way. Any suggestions? PHP Code: <?php function phpQuery(){ $query = mysql_query("INSERT INTO mytable VALUES('','name','email')"); } ?> <script type="text/javascript"> function delayQueries() { timeoutID = window.setTimeout(doQueries, 2000); } function doQueries() { var runQuery = "<?php phpQuery(); ?>"; } </script> Hi everyone, I am pretty new at javascript OOP. I have a javascript file that has plenty of javascript functions, variables, arrays, etc. I need to convert this into an object. Here is an example: Code: var myvar1 = ''; var myvar2 = new array(); var myvar3 = new array(); var myvar4; var myvar5 = 60; var myvar6 = ''; function myfunc1(){ myvar1 = 'hello'; return myvar1; } function myfunc2(somenum=0){ myvar5 = somenum; //calling myfunc1() from within this function. //do something in here } function myfunc3(){ //calling myfunc1() from within this function. for(i=0;i<somelength;i++){ myvar2 = myvar3[i]; (something to put into the array) } } 1. I need to create an object and put ALL the varibles (myvar1 - myvar5) in that object. 2. Then the first two functions "myfunc1 and myfunc2" inside the same object. 2. And the function myfunc3 needs to sit OUTSIDE my object as a regular javascript function. It calls on myfunc1 (which is inside the object) and also inserts data into myvar2 (which is classified inside the object) and myvar3 (which is classified inside the object as well). This is what i came up with, but it's not going well: Code: var myobj1 = function(){ this.myvar1 = ''; this.myvar2 = new array(); this.myvar3 = new array(); this.myvar4; this.myvar5 = 60; this.myvar6 = ''; var myfunc1 = function(){ this.myvar1 = 'hello'; return this.myvar1; } var myfunc2 = function(somenum=0;){ this.myvar5 = somenum; //calling this.myfunc1() from within this function. //do something in here } } function myfunc3(){ //calling mynewobj.myfunc1() from within this function. for(i=0;i<somelength;i++){ mynewobj.myvar2 = mynewobj.myvar3[i]; (something to put into the array) } } var mynewobj = myobj1; HELP.....!!!! i really want to get into object oriented world, so thanks in advance. hi, I'm trying to modify this function: Code: function togglePoly(poly_num) { if (document.getElementById(poly_num)) { if (document.getElementById(poly_num).checked) { gpolys[poly_num].show(); } else { gpolys[poly_num].hide(); } } } which works for a checkbox to one that works for a button. I guess I'm stuck on what to replace "checked" with there in the 3rd line. is there some one word answer, or do I need to I rewrite the function to be more button-friendly? thanks in advance This is perhaps a somewhat trivial point but it's bugged me a couple of times recently and I wondered if anyone out there had any thoughts on the matter. Essentially I have an action that can happen many times but I want to record whether it has happened at least once. I know we are talking about a trivial amount of processing and code here but is there any real difference between the following two methods: Code: myCheck: false, myRepeatedlyCalledFunction: function() { this.myCheck = true; // do some stuff } vs Code: myCheck: false, myRepeatedlyCalledFunction: function() { if(this.myCheck === false) { this.myCheck = true; } // do some stuff } thoughts? So. When I save a boolean to localStorage It converts it to string. PHP Code: localStorage["fixedBackground"] = document.getElementById("fBackground").checked; And that saves a 'true' or 'false' string. So to convert it to a boolean value, in the 'restore options' I use the function 'toBool' PHP Code: function toBool(str) { if ("false" === str) return false; else return str; } PHP Code: var value = localStorage["fixedBackground"]; if (null != value) document.getElementById("fBackground").checked = toBool(value); And that works just fine. However, I want to recall this saved data in a javascript. I want an PHP Code: if (value = true){ document.getElementsByTagName('body')[0].style.backgroundAttachment="fixed"; } But I can't get a 'toBool' type of function into that statement This is my method of retrieving the data: PHP Code: var port = chrome.extension.connect({name: "knockknock"}); port.postMessage({get: "fixedBackground"}); port.onMessage.addListener(function(msg) { //Set bgimage attachment javascript:value=msg.value; which makes the full if statement: PHP Code: var port = chrome.extension.connect({name: "knockknock"}); port.postMessage({get: "fixedBackground"}); port.onMessage.addListener(function(msg) { //Set bgimage attachment javascript:value=msg.value; if(value = true) { document.getElementsByTagName('body')[0].style.backgroundAttachment="fixed"; } }); any ideas? Hello everyone! I'm currently doing an assignment which involves a snack machine. I'm currently working on the PacketOfCrisp class. It needs to start with 10 crisps, and have a boolean field for whether or not it's closed. This field is called open and is obviously set to false when the object is created. It also needs to give out some messages, ie if the packet is not open then a message should appear saying that the packet is closed. If the pack has no crisps left a message should appear saying as such. Other than that when selecting eatCrisp the amount of crisps in the packet should go down by one. Here is what I have so far: Code: public void eatCrisp() { if(open = false) { System.out.println("Open packet"); } else if (open = true && numOfCrisps >= 1) { numOfCrisps = numOfCrisps - 1; } else { System.out.println("No Crisps!"); } } Now for some reason when I invoke eatCrisp it takes out a crisp and changes the "open" field of the object to true and I can't figure out why. As far as I can figure it should be giving me a message of "Open packet" until I open the packet with the "openPacket" method, but instead "eatCrisp" is doing that by itself. Any ideas? If I use function or Function to create a javascript function, does it make any difference ? Whats the difference between two and in which situation shall I use either ? Likewise whats the difference between event and Event objects of JavaScript ? Thanks Hello fellow programmers, I am having some trouble with my javascript doing what I want it to, which is returning values (true/false || 1/0). I haven't used much javasript but I am experienced with C#, Java, Python etc so this is sort of new to me syntax wise. Here is what I have so far: http://jsfiddle.net/HpSyJ/1/ note: for some reason css doesn't like jsfiddle :S, the error messages are hidden in my Notepad++ & firefox combo though Really all I want is when I hit submit, it runs an alert or changes the error message to visible. Can someone please have a quick read over and see if anything jumps out at them? Thanks in advance, Andrew Please I have been having sleepless nights for days and could not resolve why this codes will not work. I will appreciate any assistance to resolve the coding reerroll the main problem is the function calculate (), does work when called. Please help <HTML> <HEAD> <TITLE>Feedback</TITLE> <SCRIPT TYPE="TEXT/JAVASCRIPT"> rate = new Array(4) rate[0] = 8 rate[1] = 4 rate[2] = 6 rate[3] = 12 function calculate() { howmuch = eval("document.form1.InsVal.Value") for(loop = 0; loop < document.form1.cover.length;loop++) if (document.form1.cover[loop].checked) level = loop + 1 where =document.form1.region.selectedIndex cost = eval(10 + howmuch /100*rate[where]*level) document.form1.guote.value =cost } function confirmPurchase() { if (confirm("Area you sure you wish to purchase insurance from us?")) document.form1.submit() } </SCRIPT> </HEAD> <BODY> <H1 ALIGN = CENTER>HotWheels</H1> <H2 ALIGN = CENTER>Skateboard Insurance Specialists</H2> <FORM NAME = form1 METHOD = post ACTION = "mailto:ioduwa@yahoo.com"> <P><B> Value of board:</B> <INPUT TYPE = text NAME = InsVal SIZE = 10> <P> Region <SELECT NAME= region> <OPTION = london> London <OPTION = southwest> South West <OPTION = rest>Rest of England <OPTION = wales>Wales </SELECT> <BR><INPUT TYPE = Radio NAME = cover> Third Party <BR><INPUT TYPE = Radio NAME = cover> Third Party Fire and Theft <BR><INPUT TYPE = Radio NAME = cover CHECKED> Comprehensive <P><INPUT TYPE = "button" NAME = "calc" VALUE = "Get guote" onClick ="calculate()"> <P><B> Your Quotation:<B> <INPUT TYPE = "text" NAME = "quote" SIZE = 10> <P><INPUT TYPE = "button" NAME = "done" VALUE = "Purchase" onClick = "comfirmPurchase()"> </FORM> </BODY> </HTML> Hi I have a JavaScript function that has leaves floating around the screen and I need a way to have a checkbox turn on and off the function. Or I need a way to have a button turn off the script. I have the code to start the function on-loading the site. Any ideas are greatly appreciated. I got the falling leaves script from http://javascript.about.com/gi/o.htm...tip62.htm%3Ffm Hello, I have a php function PHP Code: function npclocs() { $npcl=$db->query("SELECT * FROM npclocation WHERE npclong < {$ir['userlongitute']}+5 AND npclong > {$ir['userlongitute']}-5 AND npclat > {$ir['userlatitude']}-5 AND npclat < {$ir['userlatitude']}+5 "); /*$npcarray = mysql_fetch_array($npcl);*/ $rows =0; while($row = $db->fetch_row($npcl)) { $nloc[]=$row; } foreach($nloc as $n) { echo "newpoints[" . $rows . "] = new Array(".$n['npclong'].", ".$n['npclat'].", ".$n['npciicon'].", ".$n['npclname'].", ".$n['npclname']."); "; $rows++; } } and I have a javascript function that I would like the results of this function to insert its results in the javascript here is the function in javascript Code: function addPoints() { //newpoints[0] = new Array(-73, 46, icon0, 'monroe', 'monroepopup'); //newpoints[1] = new Array(-69, 52, icon0, 'jackson', 'jacksonpopup'); //newpoints[2] = new Array(-45, 39, icon0, 'Benton', 'bentonpopup'); for(var i = 0; i < newpoints.length; i++) { var point = new GPoint(newpoints[i][1],newpoints[i][0]); var popuphtml = newpoints[i][4] ; var marker = createMarker(point,newpoints[i][2],popuphtml); map.addOverlay(marker); } } The commented out //newpoints is the old js array. my php function queries mysql and uses whiles and foreach to create the same output, as the old js array. I would like that php function result to insert its result into the js function. Is this possible? Thank you in advance. Hi, I have a javascript code in my site which is similar to this: var menu1=new Array() menu1[0]='<hr style="color: \'#FFCC66\'; height: \'1\'; text-align: \'left\'; width: \'96%\'"><strong><font size=+2>text1</font></strong>' var menu2=new Array() menu2[0]='<hr style="color: \'#FFCC66\'; height: \'1\'; text-align: \'left\'; width: \'96%\'"><strong><font size=+2>text2</font></strong>' The list goes on for hunders of records. What I need to do, is to use a function in which I will pass the text1, text2, text3 as variables, and have the html code returned, since it's always the same. For example, I would need something like: var menu1=new Array() menu1[0]='display_html(text1)' var menu2=new Array() menu1[0]='display_html(text2)' This would save me a lot of bytes in the output file, but I'm not very familiar with javascript so I didn't manage to make it work. I tried using the document.write command in a function, but that forced the text to be displayed on my page, even though it was supposed to be shown only when the user clicks on a link. I'm using the "AnyLink Drop Down Menu" script from www.dynamicdrive.com. Any help would be highly appreciated! Can anyone look at some code to tell me what I am doing wrong. The hide and show feature work if the item is on the same page. If I want to have a link drop to another page, this code does not work. 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>Peake Healthcare Innovations-Company</title> <script type="text/javascript"> <!-- function MM_swapImgRestore() { //v3.0 var i, x, a = document.MM_sr; for (i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++) x.src = x.oSrc; } function MM_preloadImages() { //v3.0 var d = document; if (d.images) { if (!d.MM_p) d.MM_p = new Array(); var i, j = d.MM_p.length, a = MM_preloadImages.arguments; for (i = 0; i < a.length; i++) if (a[i].indexOf("#") != 0) { d.MM_p[j] = new Image; d.MM_p[j++].src = a[i]; } } } function MM_findObj(n, d) { //v4.01 var p, i, x; if (!d) d = document; if ((p = n.indexOf("?")) > 0 && parent.frames.length) { d = parent.frames[n.substring(p + 1)].document; n = n.substring(0, p); } if (!(x = d[n]) && d.all) x = d.all[n]; for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n]; for (i = 0; !x && d.layers && i < d.layers.length; i++) x = MM_findObj(n, d.layers[i].document); if (!x && d.getElementById) x = d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i, j = 0, x, a = MM_swapImage.arguments; document.MM_sr = new Array; for (i = 0; i < (a.length - 2); i += 3) if ((x = MM_findObj(a[i])) != null) { document.MM_sr[j++] = x; if (!x.oSrc) x.oSrc = x.src; x.src = a[i + 2]; } } function goto(pID) { document.getElementById(pID).scrollIntoView(); } function showDiv(pdiv) { switch (pdiv.toLowerCase()) { case "company": document.getElementById(pdiv).style.display = 'inline'; document.getElementById("companysplash").style.display = 'inline'; document.getElementById("codiv").style.display = 'none'; document.getElementById("performance").style.display = 'none'; document.getElementById("differentiates").style.display = 'none'; document.getElementById("multiuse").style.display = 'none'; break; case "codiv": document.getElementById(pdiv).style.display = 'inline'; document.getElementById("company").style.display = 'none'; document.getElementById("performance").style.display = 'none'; document.getElementById("differentiates").style.display = 'none'; document.getElementById("companysplash").style.display = 'none'; document.getElementById("multiuse").style.display = 'inline'; break; case "performance": document.getElementById(pdiv).style.display = 'inline'; document.getElementById("company").style.display = 'none'; document.getElementById("codiv").style.display = 'none'; document.getElementById("differentiates").style.display = 'none'; document.getElementById("companysplash").style.display = 'none'; document.getElementById("multiuse").style.display = 'inline'; break; case "differentiates": document.getElementById(pdiv).style.display = 'inline'; document.getElementById("company").style.display = 'none'; document.getElementById("codiv").style.display = 'none'; document.getElementById("performance").style.display = 'none'; document.getElementById("multiuse").style.display = 'inline'; document.getElementById("companysplash").style.display = 'none'; break; } } //--> </script> <script type="text/javascript" src="../dropdowntabs/dropdowntabfiles/dropdowntabs.js"></script> <link href="styles/main.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" type="text/css" href="script/new_droptabs.css"> </head> <body bgcolor="#999999" onload="MM_preloadImages('images/rt_bar_glow_repeater.gif')"> <table width="967" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF"> <tr> <td> <script type="text/javascript"> //SYNTAX: tabdropdown.init("menu_id", [integer OR "auto"]) tabdropdown.init("colortab", 3) </script> <div id="dropmenu" class="top-menu"> <ul> <li><a href="index.html"><span class="whitelink">Home</span></a></li> <li><a href="company.html" rel="dropmenu1_b"><span class="whitelink">Company</span></a></li> <li><a href="community.html" rel="dropmenu2_b"><span class="whitelink">Community</span></a></li> <li><a href="services.html" rel="dropmenu3_b"><span class="whitelink">Services</span></a></li> <li><a href="solutions.html" id="last-link" tile="Solutions" rel="dropmenu4_b"><span class="whitelink">Solutions</span></a></li> </ul> </div> <!--1st drop down menu/Company --> <div id="dropmenu1_b" class="dropmenudiv_b"> <a href="javascript:%20showDiv('performance');">Peake Performance</a> <a href="javascript:%20showDiv('differentiates');">What Differentiates Us</a> </div> <!--2nd drop down menu/Community --> <div id="dropmenu2_b" class="dropmenudiv_b" style="width: 150px;"> <a href="../dropdowntabs/Community.html" id="collaboration">Collaboration</a> </div> <!--3rd drop down menu/Services --> <div id="dropmenu3_b" class="dropmenudiv_b" style="width: 150px;"> <a href="javascript:%20showDiv('singleplace');">Acessability</a> <a href="javascript:%20showDiv('portfolio');">Peake Portfolio</a> </div> <!--4th drop down menu/Solutions --> <div id="dropmenu4_b" class="dropmenudiv_b" style="width: 150px;"> <a href="javascript:%20showDiv('strategy');">Imaging Strategy</a> <a href="javascript:%20showDiv('imagesharing');">Image Sharing</a> </div> </td> </tr> <tr> <td> <!--PBanners to go here--> <table width="967" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <div id="affiliate">An affiliate of Harris Corporation and Johns Hopkins Medicine</div></td> </tr> <tr> <td> <div style="display: inline;" id="companysplash"> <img src="images/focal_layered.jpg" alt="Peake Healthcare Innovations" width="967" height="195" border="0" usemap="#Map" /> </div> <div style="display: none;" id="multiuse"> <img src="images/Peake_Multiuse_Banner.jpg" width="967" height="140" alt="Peake Healthcare Innovations" /> </div> </td> </tr> </table> <!--End Banners here--> </td> </tr> <tr> <td height="29"> <table width="967" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="728" valign="top"> <!--Start Main Content Company --> <div style="display: inline;" id="company"> <div class="title"> Headline Goes Here</div> <fieldset style="float:right; width:200px; height:400px; border:0;"> <img src="images/Service_Assets_Placeholder.jpg" width="160" height="111" alt="Service Assets Placeholder" /><br/> <div class="callout_title">THE PEAKE TEAM</div> <div class="callout_text">Read more about the <br/>Peake Team<i></i></div> <div class="callout_link"><a href="http://www.harris.com">MORE</a> ></div> <br/> <img src="images/Harris_Corporate_Building.jpg" width="160" height="111" alt="Service Assets Placeholder" /><br/> <div class="callout_title">PEAKE PARTNERS</div> <div class="callout_text">Delivering a way to better healthcare by working together<i></i></div> <div class="callout_link"><a href="http://www.harris.com">MORE</a> ></div> <p> </p> </fieldset> <div class="subhead">Subhead to go here</div> <div class="bodylg">Founded in March 2011, Baltimore-based Peak Healthcare Innovations (Peake) offers the first complete, cloud-based medical image management solution for global markets. </div> <br/> <div class="content">Peake was formed as a joint venture between two widely recognized market leaders: Johns Hopkins Medicine and Harris Healthcare Solutions. Peake blends the prowers of Hopkins' clinical and research expertise with Harris Corporation's proven track record in the application of Interoperability best practices, secure communications and managed services for national IT infrastructures. <a href="javascript:%20showDiv('codiv');">LEARN MORE</a> ></div></div> <br/> </div> <!--End Main Content Company --> <br/> <!--Start Secondary Content Company --> <div style="display: none;" id="codiv"> <table width="291px" border="0" cellpadding="0" cellspacing="0" class="callout_table" style="float:left"> <tr> <td height="44" colspan="3"><img src="images/left_placeholder.gif" width="291" height="325" /></td> </tr> <tr> <td height="35" colspan="3" class="callout_header">Related Items</td> </tr> <tr> <td width="49%" height="88"> <fieldset style="padding:5px; height:115px;"> <div class="callout_title">PEAKE PERFORMANCE</div> <div class="callout_text">Peake gets it–<br/><i>Physicians never wait</i></div> <div class="callout_link"><a href="javascript:%20showDiv('performance');">MORE</a> ></div> </fieldset> </td> <td width="2%" height="88"> </td> <td width="49%"> <fieldset style="padding:5px; height:115px;"> <div class="callout_title">PEAKE DIFFERENCES</div> <div class="callout_text">An uncommon solution provider in a rapidly evolving marketplace</div> <div class="callout_link"> <a href="javascript:%20showDiv('differentiates');">MORE</a> ></div> </fieldset> </td> </tr> </table> <img src="images/The_Peake_Company_Title.jpg" width="350" height="22" alt="The Peake Company" /> <div class="subhead">Unprecedented Performance at the point of care.</div> <div class="content">Peake's mission is to improve the quality of patient care and the efficiency of the patient care delivery process through transformatice innovation in health information management. By building on the strength of open-source software, Peak will could-enable the medical imaging practices of hospitals, integrated delivery networks, and health information exchanges with unprecedented performance at the point of care. Our secure, redundant, reliable cloud-based solutions facilitate colllaboration within and accross enterprise boundaries connecting care providers and patients like never before.<br/></div> <div class="content"> <fieldset style=" padding-left:7px; padding-right:7px; padding-top:3px;"> <div class="callout_titleb">PEAKE GENERATES VALUE FOR THE HEALTHCARE ENTERPRISE IN TWO WAYS:</div> <ul> <li>The significant decuction in cost of imaging operations </li> <li>An improvement of access to mission critical information</li> </ul> </fieldset> <br/> This is achieved through our partnership-oriented business model that places emphasis on performance and services. With no up front capital expense and scaled on the performance of your imaging businemass, our world class services are provided as an essentail utility in a pure, operational expense model. We combine our extensive development efforts with the industry's best applications to empower healthcare providers with choice. The choice of clinical, diagnostic and advanced 3D solutions as well as other workflow optimizing services that speed the adoption of technology and the care delivery process. Our customers now have technology packaged as a flexible service eliminating the burden associated with "vendor lock" to best meet the needs of clinicians, patients and communities today, tomorrow, and in the future. </div> </div> <!--End Secondary Content Company --> <!--Start Secondary Performance Content Company --> <div style="display: none;" id="performance"> <table width="291px" border="0" cellpadding="0" cellspacing="0" class="callout_table" style="float:left"> <tr> <td height="44" colspan="3"><img src="images/left_placeholder.gif" width="291" height="325" /></td> </tr> <tr> <td height="35" colspan="3" class="callout_header">Related Items</td> </tr> <tr> <td width="49%" height="88"> <fieldset style="padding:5px; height:115px;"> <div class="callout_title">PEAKE PERFORMANCE</div> <div class="callout_text">Peake gets it–<br/><i>Physicians never wait</i></div> <div class="callout_link"><a href="javascript:%20showDiv('performance');">MORE</a> ></div> </fieldset> </td> <td width="2%" height="88"> </td> <td width="49%"> <fieldset style="padding:5px; height:115px;"> <div class="callout_title">PEAKE DIFFERENCES</div> <div class="callout_text">An uncommon solution provider in a rapidly evolving marketplace</div> <div class="callout_link"><a href="javascript:%20showDiv('differentiates');">MORE</a> ></div> </fieldset> </td> </tr> </table> <div class="title"> Headline Goes Here</div> <div class="subhead">Achieve Peake Performance in Your Imaging Practice</div> <div class="content">Peake Healthcare Innovations believes that enterprise imaging solutions should be based on strong financial value, effective clinical utility and uncompromising reliability. While most vendors charge millions of dollars for software applications that place a significant burden on IT staff and disrupt clinical practice, Peake provides the world's most scalable, powerful and versatile Vendor Neutral Archive (VNA) at NO COST of software. Peake builds on the strength and popularity of DCM4CHEE, an open source software project established in 2000, as the basis for a commercial, cloud-based archiving solution. By returning Peake's substantive improvements to this proven application back to the healthcare community, our solutions uniquely offer what healthcare providers have been seeking from their vendor partnerships all along: <strong>choice</strong>. </div> <div class="content"> While healthcare providers, health information exchanges and accountable care organizations are unique in their size, scope and operations, most face the same challenges–increasing costs, decreasing reimbursement and changing regulation. Peake is dedicated to providing a complete image management solution offering to meet your needs. From cross-enterprise image exchange to clinical, diagnostic, and advanced 3D visualization, to a unified clinical image archive solution, disaster recovery and business continuity, Peake has what you need with the performance, security and reliability you would expect from an on-premise solution–at a fraction of the cost.</div> <div class="content"><strong>Connect, communicate, and collaborate within the enterprise and across the continuum of care.<br/> eake gets it—<i>Physicians never wait</i>.</strong> </div> </div> <!--End Secondary Performance Content Company --> <!--Start Secondary Differences Content Company --> <div style="display: none;" id="differentiates"> <table width="291px" border="0" cellpadding="0" cellspacing="0" class="callout_table" style="float:left"> <tr> <td height="44" colspan="3"><img src="images/left_placeholder.gif" width="291" height="325" /></td> </tr> <tr> <td height="35" colspan="3" class="callout_header">Related Items</td> </tr> <tr> <td width="49%" height="88"> <fieldset style="padding:5px; height:130px;"> <div class="callout_title">PEAKE PERFORMANCE</div> <div class="callout_text">Peake gets it–<br/><i>Physicians never wait</i></div> <div class="callout_link"><a href="javascript:%20showDiv('performance');">MORE</a> ></div> </fieldset> </td> <td width="2%" height="88"> </td> <td width="49%"> <fieldset style="padding:5px; height:130px;"> <div class="callout_title">ABOUT PEAKE </div> <div class="callout_text">The first complete cloud-based medical image management solutions for global markets</div> <div class="callout_link"><a href="javascript:%20showDiv('company');">MORE</a> ></div> </fieldset> </td> </tr> </table> <div class="title"> Headline Goes Here</div> <div class="subhead">What differentiates us?</div> <div class="content">Have no doubt, Peake is an uncommon solution provider in a rapidly evolving commercial marketplace. Unlike vendors that offer costly, siloed, often proprietary, software applications, Peake partners with our customers to create a unique solution that delivers the clinical applications and workflow your medical staff require as a service–improving the cost and effectiveness of care delivery. This innovative approach provides the flexibility and choice needed to continually improve your competitiveness in an otherwise uncertain reimbursement environment.<br/><br/> <fieldset style="padding:8px;"> <div class="callout_title">ALL OF OUR SERVICE OFFERINGS:</div> <ul> <li>Operate on a standards-based, highly secured, 3x redundant cloud platform</li> <li>Enhance and augment standards related to DICOM, IHE, and HL7 </li> <li>Were developed with unique technologies to accelerate and improve the performance and reliability of conventional image management solutions</li> <li>Provide a simple, flexible operational cost basis for delivery–no upfront capital is required</li> <li>Reduce the cost associated with medical imaging information technology by 15-30% annually</li> <li>Combine the experience and knowledge of Harris Corporation and Johns Hopkins Medicine to provide you a trusted, technology services partner </li> </ul> </fieldset> </div> </div> <!--End Secondary Differences Content Company --> </td> <!--End Main Content--> <!--Start What's New Column--> <td width="239" rowspan="2" valign="top"> <table width="239" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="whatsnew"> </td> </tr> <tr> <td> <img src="images/wedge.gif" width="238" height="13" /></td> </tr> <tr> <td colspan="3" height="45px" class="frame"> <div class="rtbarheader">LATEST NEWS</div> <p class="rtbar">Check back soon for the latest news.</p> </td> </tr> <tr> <td colspan="3" height="45px" class="frame"> <div class="rtbarheader">CURRENT DOWNLOADS</div> <p class="rtbar">Check back soon for downloads.</p> </td> </tr> <tr> <td colspan="3" height="158px" class="frame" > <div class="rtbarheader">UPCOMING EVENTS</div> <p class="rtbar">Peake will be at RSNA 2011 on Nov. 27–Dec. 2, 2011 for the 97th Scientific Assembly and Annual Meeting.</p> <p class="rtbar">Meet Peake at the HIMSS12 Annual Conference and Exhibition on Feb. 20–24, 2012 at the Venetian Sands Expo Center in Las Vegas, NV.</p> </td> </tr> <tr> <td colspan="3" height="7"><img src="images/whats_new_hairline_bottom.gif" width="238" height="7" /></td> </tr> </table> </td> <!--End What's New Column--> </tr> </table> </td> </tr> <tr> <td height="214"> <!--Footer input to go here --> </td> </tr> </table> <map name="Map" id="Map"> <area shape="rect" coords="11,43,239,155" href="index.html" target="_self" alt="Peake Healthcare Innovations" /> </map> </body> </html> <!--This script here will tell the code which instance to show first--> <script> showDiv('company'); </script> <script type="text/javascript"> //SYNTAX: tabdropdown.init("menu_id", [integer OR "auto"]) tabdropdown.init("dropmenu") </script> <!--End Section--> Hello I am setting up a Javascript function in a page called functions.php function onAddBookmarkPressed() { <? mail("XXXXXXX", "Mail","Bookmark"); ?> } And calling it from another place within the page <div class="barstepimg"><img src="http://staggan.com/my_dir/images/progress_bar/fb_buttons/add_bookmark.gif" onclick="onAddBookmarkPressed();"/></div> I include functions.php in my index.php page... When I run the index.php page the function above runs and emails me... Any idea why? I have javascript that sets global variables to true. Here is the code: Code: <script type="text/javascript"> var count=0; var castforfood=false; var sc2mx=false; var ozrak=false; var chavodelocho=false; var jimrising=false; var day9tv=false; function justinlive(arg){ if(arg != null){ if(count==2){ ozrak=true; } else if(count==5){ day9tv=true; } } count++; } function livestatus(arg){ if (arg.channel.isLive == true){ if (count==1){ sc2mx=true; } else if (count==3){ chavodelocho=true; } } count++; } function set_status(status){ if (status == "live"){ if (count==0){ castforfood=true; } else if (count==4){ jimrising=true; } } count++; } [...] </script> [...] <!-- THIS IS WHERE THE FUNCTIONS ARE CALLED. --> <script type="text/javascript" src="http://api.ustream.tv/json/channel/castforfood/getValueOf/status?key=XXXXXX&callback=set_status"></script> <script type="text/javascript" src="http://xsc2mxx.api.channel.livestream.com/2.0/livestatus.json?callback=livestatus"></script> <!-- FIRST CALL TO justinlive IS THE LINE BELOW. IT WORKS FINE. --> <script type="text/javascript" src="http://api.justin.tv/api/stream/list.json?channel=ozrak&jsonp=justinlive"></script> <script type="text/javascript" src="http://xchavodelochox.api.channel.livestream.com/2.0/livestatus.json?callback=livestatus"></script> <script type="text/javascript" src="http://api.ustream.tv/json/channel/jim-rising/getValueOf/status?key=XXXXXX&callback=set_status"></script> <!-- SECOND CALL TO justinlive IS THE LINE BELOW. IT NEVER HAPPENS. --> <script type="text/javascript" src="http://api.justin.tv/api/stream/list.json?channel=day9tv&jsonp=justinlive"></script> The calls to set_status and livestatus work just fine. The problem is calling "justinlive". It only works correctly the first time. The second time, the function does not execute at all. (I tried inserting an "alert("Hello"); at the beginning of the function, so I know it only gets executed once.) I'm pretty sure this is a simple issue, but I've been stuck on this for weeks now. Help is appreciated. Hi guys, calling a php page through AJAX. and it works Aok. I wanted the ajax backend php file to call a function in the front end page. even a simple alert from the backend php file wont work. Any help is greatly appreciated. My code to call the alert and parent's javascript functions are below. Simple alert Code: echo "<script language='javascript'>alert('Please Help Me');</script>"; Calling Front End Page Function Code: echo "<script language='javascript'>frontend_function();</script>"; Cheers Elabuwa |