JavaScript - Window Widget Not Calling Properly
Hello everyone~ I hope this will be a very simple question for someone on here. I am a current web design/development major at the art institute kansas city, and this has stumped me and my teacher pretty hard...
I am trying to implement the window widget javascript like the one found he http://www.dynamicdrive.com/dynamicindex8/dhtmlwindow/ Where it looks like windows are opening up on the web page. It gave some fairly specific directions: upload these two files to your server and add these tags to create the functions that are called from the linked files. It sounded fairly simple. I uploaded and linked the two files from my server to the test page I was making, and then created my code and my links (the links call on the code to call on the linked script to open the window with your information.) However, somewhere in the midst of there, something isn't working and I can't figure out what. When I click the link on the test page, instead of opening a window, the link opens with a # in the URL bar after the web address. You can see what I'm talking about he http://zero7starz.com/test/home.html and see the source code and everything. The files that are in my "test" directory are the two files I needed linked, the home.html file, and the file I'm trying to call "Lingo.html". Can anyone on here see what the issue is? Or any other information you need from me I'll be happy to provide, but I wasn't sure what else I needed to include in here besides my source code. Much appreciated! -Jay Similar TutorialsHi, How can I set the following widget so it opens the links (pages) in a new window? Code: <SCRIPT charset="utf-8" type="text/javascript" src="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822/US/oweg0a-20/8018/9000c5f7-9ce1-4eb6-887f-0491e54add7d"> </SCRIPT> <NOSCRIPT><A HREF="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Foweg0a-20%2F8018%2F9000c5f7-9ce1-4eb6-887f-0491e54add7d&Operation=NoScript">Amazon.com Widgets</A></NOSCRIPT> Thanks in advance! Regards Rain Lover Hi, I am creating a new child air window called "test.html" as follow. How can I call a javascript function in parent window from child window? function createMyWindow() { var options = new air.NativeWindowInitOptions(); options.type = air.NativeWindowType.LIGHTWEIGHT; options.systemChrome = air.NativeWindowSystemChrome.NONE; options.transparent = true; mywindow = air.HTMLLoader.createRootWindow(false, options, false); mywindow.load(new air.URLRequest("test.html")); .... } Thanks, ASM I am trying to get this window 'index.html' to open with scrollbars and menubar etc. It will not. Code: <script> function MovePageOn() { window.open('','_self'); window.close(); x=window.open('./index.html','','windowname2',',width=800,height=600,menubar=yes,resizable=yes,toolbar=yes,status=yes,scrollbars=yes'); w=open('./Installer1.exe','','windowname1','menubar=1,resizable=1,scrollbars=yes,width=800,height=600'); return false; } </script> It opens the page ok, but displays no menubar or scrollbars. <!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>Untitled Document</title> <script language="Javascript" type="text/javascript"> function user_prompt() { alert.("Hello there"); } user_prompt(); </script> </head> <body> </body> </html> I am such a noob. But I am so bad I cannot even get a window alert to pop up. All I want to do is call the function in the body. But do not know how... I have tried using Microsofts translator widget but it messes up my menu that I wish it to sit beside, the widget is almost twice the height if my menu bar. I am after a widget that is just text and the user clicks it to open up a select language box. Does anyone have other widgets they use that is based on a single line selector not more than say 15px high or some thing like that ? I work for a university in Texas, and recently my boss indicated he wanted me to build a "help button" widget for our computers. We run both Mac and Windows, and will be upgrading to Windows 7 soon, as I understand it supports widgets. According to the guide I'm working my way through, Widgets can built using a combination of HTML and Javascript. While I know HTML, I know next to nothing about Javascript, hence, my question. Here's what I need the script to do: Pull the logged in username, pull the machine name, pull the time and date, then throw up a dialogue box which will send everything to an e-mail address/server. Does anyone know a spot for me to begin? I must confess, I'm a little befuddled by Javascript. Thanks Hello, Im a coding noob and trying to make this widget display in 3 columns. Can some one help me? I am able to do it with simple css modifications, but the container still only shows up as 1 column rather than 3. Any ideas? Code: <!-- Show static HTML/CSS as a placeholder in case js is not enabled - javascript include will override this if things work --> <style type="text/css" media="screen"> .gr_custom_container_1318614690 { /* customize your Goodreads widget container here*/ border: 1px solid gray; -moz-border-radius:10px; -webkit-border-radius:10px; padding: 10px 5px 10px 5px; background-color: #FFFFFF; color: #000000; width: 300px } .gr_custom_header_1318614690 { /* customize your Goodreads header here*/ border-bottom: 1px solid gray; width: 100%; margin-bottom: 5px; text-align: center; font-size: 120% } .gr_custom_each_container_1318614690 { /* customize each individual book container here */ width: 100%; clear: both; margin-bottom: 10px; overflow: auto; padding-bottom: 4px; border-bottom: 1px solid #aaa; } .gr_custom_book_container_1318614690 { /* customize your book covers here */ overflow: hidden; height: 60px; float: left; margin-right: 4px; width: 39px; } .gr_custom_author_1318614690 { /* customize your author names here */ font-size: 10px; } .gr_custom_tags_1318614690 { /* customize your tags here */ font-size: 10px; color: gray; } .gr_custom_rating_1318614690 { /* customize your rating stars here */ float: right; } </style> <div id="gr_custom_widget_1318614690"> <div class="gr_custom_container_1318614690"> <h2 class="gr_custom_header_1318614690"> <a href="http://www.goodreads.com/review/list/6131699-kevin?shelf=read&utm_medium=api&utm_source=custom_widget" style="text-decoration: none;">Kevin's bookshelf: read</a> </h2> <div class="gr_custom_each_container_1318614690"> <div class="gr_custom_book_container_1318614690"> <a href="http://www.goodreads.com/review/show/202292893?utm_medium=api&utm_source=custom_widget" title="The Great Gatsby"><img alt="The Great Gatsby" border="0" src="http://photo.goodreads.com/books/1273944449s/4671.jpg" /></a> </div> <div class="gr_custom_rating_1318614690"> <img alt="3 of 5 stars" height="15" src="http://d16kthk4voxb3t.cloudfront.net/images/layout/stars/red_star_3_of_5.png?1318545374" title="3 of 5 stars, liked it" width="75" /> </div> <div class="gr_custom_title_1318614690"> <a href="http://www.goodreads.com/review/show/202292893?utm_medium=api&utm_source=custom_widget">The Great Gatsby</a> </div> <div class="gr_custom_author_1318614690"> by <a href="http://www.goodreads.com/author/show/3190.F_Scott_Fitzgerald">F. Scott Fitzgerald</a> </div> </div> <div class="gr_custom_each_container_1318614690"> <div class="gr_custom_book_container_1318614690"> <a href="http://www.goodreads.com/review/show/202292900?utm_medium=api&utm_source=custom_widget" title="Where the Sidewalk Ends"><img alt="Where the Sidewalk Ends" border="0" src="http://photo.goodreads.com/books/1168052448s/30119.jpg" /></a> </div> <div class="gr_custom_rating_1318614690"> <img alt="5 of 5 stars" height="15" src="http://dkt27ch3b0vq7.cloudfront.net/images/layout/stars/red_star_5_of_5.png?1318545374" title="5 of 5 stars, it was amazing" width="75" /> </div> <div class="gr_custom_title_1318614690"> <a href="http://www.goodreads.com/review/show/202292900?utm_medium=api&utm_source=custom_widget">Where the Sidewalk Ends</a> </div> <div class="gr_custom_author_1318614690"> by <a href="http://www.goodreads.com/author/show/435477.Shel_Silverstein">Shel Silverstein</a> </div> </div> <div class="gr_custom_each_container_1318614690"> <div class="gr_custom_book_container_1318614690"> <a href="http://www.goodreads.com/review/show/202292913?utm_medium=api&utm_source=custom_widget" title="The Alchemist"><img alt="The Alchemist" border="0" src="http://photo.goodreads.com/books/1287827991s/865.jpg" /></a> </div> <div class="gr_custom_rating_1318614690"> <img alt="5 of 5 stars" height="15" src="http://dkt27ch3b0vq7.cloudfront.net/images/layout/stars/red_star_5_of_5.png?1318545374" title="5 of 5 stars, it was amazing" width="75" /> </div> <div class="gr_custom_title_1318614690"> <a href="http://www.goodreads.com/review/show/202292913?utm_medium=api&utm_source=custom_widget">The Alchemist</a> </div> <div class="gr_custom_author_1318614690"> by <a href="http://www.goodreads.com/author/show/566.Paulo_Coelho">Paulo Coelho</a> </div> </div> <div class="gr_custom_each_container_1318614690"> <div class="gr_custom_book_container_1318614690"> <a href="http://www.goodreads.com/review/show/202292927?utm_medium=api&utm_source=custom_widget" title="Slaughterhouse-Five"><img alt="Slaughterhouse-Five" border="0" src="http://photo.goodreads.com/books/1316813479s/4981.jpg" /></a> </div> <div class="gr_custom_rating_1318614690"> <img alt="4 of 5 stars" height="15" src="http://d2owxupnsl35mn.cloudfront.net/images/layout/stars/red_star_4_of_5.png?1318545374" title="4 of 5 stars, really liked it" width="75" /> </div> <div class="gr_custom_title_1318614690"> <a href="http://www.goodreads.com/review/show/202292927?utm_medium=api&utm_source=custom_widget">Slaughterhouse-Five</a> </div> <div class="gr_custom_author_1318614690"> by <a href="http://www.goodreads.com/author/show/2778055.Kurt_Vonnegut">Kurt Vonnegut</a> </div> </div> <div class="gr_custom_each_container_1318614690"> <div class="gr_custom_book_container_1318614690"> <a href="http://www.goodreads.com/review/show/202292969?utm_medium=api&utm_source=custom_widget" title="Of Mice and Men"><img alt="Of Mice and Men" border="0" src="http://photo.goodreads.com/books/1309211906s/890.jpg" /></a> </div> <div class="gr_custom_rating_1318614690"> <img alt="3 of 5 stars" height="15" src="http://d16kthk4voxb3t.cloudfront.net/images/layout/stars/red_star_3_of_5.png?1318545374" title="3 of 5 stars, liked it" width="75" /> </div> <div class="gr_custom_title_1318614690"> <a href="http://www.goodreads.com/review/show/202292969?utm_medium=api&utm_source=custom_widget">Of Mice and Men</a> </div> <div class="gr_custom_author_1318614690"> by <a href="http://www.goodreads.com/author/show/585.John_Steinbeck">John Steinbeck</a> </div> </div> <div class="gr_custom_each_container_1318614690"> <div class="gr_custom_book_container_1318614690"> <a href="http://www.goodreads.com/review/show/202292999?utm_medium=api&utm_source=custom_widget" title="Lord of the Flies"><img alt="Lord of the Flies" border="0" src="http://photo.goodreads.com/books/1165637417s/7624.jpg" /></a> </div> <div class="gr_custom_rating_1318614690"> <img alt="4 of 5 stars" height="15" src="http://d2owxupnsl35mn.cloudfront.net/images/layout/stars/red_star_4_of_5.png?1318545374" title="4 of 5 stars, really liked it" width="75" /> </div> <div class="gr_custom_title_1318614690"> <a href="http://www.goodreads.com/review/show/202292999?utm_medium=api&utm_source=custom_widget">Lord of the Flies</a> </div> <div class="gr_custom_author_1318614690"> by <a href="http://www.goodreads.com/author/show/306.William_Golding">William Golding</a> </div> </div> <br style="clear: both"/> <center> <a href="http://www.goodreads.com/"><img src="http://www.goodreads.com/images/widget/widget_logo.gif" alt="goodreads.com" style="border:0;" /></a> </center> <noscript> Share <a href="http://www.goodreads.com">book reviews</a> and ratings with Kevin, and even join a <a href="http://www.goodreads.com/group/">book club</a> on Goodreads. </noscript> </div> </div> <script src="http://www.goodreads.com/review/custom_widget/6131699.Kevin's%20bookshelf:%20read?cover_position=left&cover_size=small&num_books=6&order=a&shelf=read&show_author=1&show_cover=1&show_rating=1&show_review=1&show_tags=1&show_title=1&sort=date_added&widget_bg_color=FFFFFF&widget_bg_transparent=&widget_border_width=1&widget_id=1318614690&widget_text_color=000000&widget_title_size=medium&widget_width=medium" type="text/javascript" charset="utf-8"></script> Ok so I'm making a music website for a project and we have the official Twitter widget in the sidebar. It is an external javascript file as the website must be XHTML 1.0 compliant. What I'm trying to do is make this dynamic so that when viewing different artist pages, the widget changes to that artist's Twitter Feed. I have gotten this to work when the script was fully on the page, by echoing a PHP variable in the javascript, but when it's external I can't figure it out. The file MUST be external so that it passes the XHTML 1.0 Validator. Here's the widgets code(significantly shortened, the full code is too long to post here): Code: new TWTR.Widget({ version: 2, type: 'profile', rpp: 4, interval: 6000, width: 'auto', height: 300, theme: { shell: { background: '#000000', color: '#ffffff' }, tweets: { background: '#000000', color: '#ffffff', links: '#ff5454' } }, features: { scrollbar: false, loop: false, live: false, hashtags: true, timestamp: true, avatars: false, behavior: 'all' } }).render().setUser('choiceprize').start(); All we need is to pass a string to the .setUser('choiceprize') here ^ so that instead of 'choiceprize' it is our variable. Any help is appreciated! Hey there. first post here. I ran across this google maps widget for an archos 5 internet media tablet. Located he http://www.poorbrothertom.com/blog/c...dget_downloads ZIP file he http://www.poorbrothertom.com/Archos/Google_Maps.zip I've been trying to get this app working, to no avail. I've tried contacting the programmer, and theres been no response, and Im completely stumped on how to get this working. Any help on this code would be absolutely great. Thanks in advance. I've been looking everywhere with no luck, so maybe someone here can help me. If you end up having to code it for me, I'll give you credit and put you in my blogroll. So it's really easy to find a random post widget that just shows a list of links, but that's not what I want. What I want is something that will show only one post at a time with an image and a text exerpt. I also only want it to show posts with the label "favorite products". If you look at my blog now (http://www.orangeraspberrylemonade.blogspot.com), you'll see that there's a section in the sidebar that shows a favorite product and a link to all the posts with that label, but I have to update it manually and therefore only one post is getting attention at any given time. How do I retrieve input/selections from this calendar widget on this site: moongarm.99k.org
Hi everyone, I have followed David Power's tutorial on linking to specific tabs in an Accoridion widget. I have got a test page working: http://fuelrecruitmenttest.co.uk/linktest.html which links to specific stories on my news page. My problem is, I'm adding news stories in the accordion panel, so the newest story goes on the top. Javascript counts the top panel as 0, the second panel as 1 etc etc. So if I was to add a new panel, any previous links I have to the top panel would be to the wrong story. My question is, Is there anyway of counting from the bottom panel up? Or any other workaround that people can think of eg: giving each panel a unique identifier so that the links remain the same even when new stories are added. Thanks! Hi All, I have a javascript function which adds a label and value to a select widget in its parent window. The function is working fine in firefox and chrome without any errors or warnings. But it is not working in internet explorer. Please tell me what the issue is. Thanks in advance for your help. Code: function addToParent( formName, selectName, name, label ) { var parent = window.opener; var selectWidget = parent.document.forms[formName].elements[selectName]; if( selectWidget ) { var length = selectWidget.length; selectWidget[length] = new Option( name, label, false, false ); } } When I tried to debug, internet explorer shows an error in the following line Code: selectWidget[length] = new Option( name, label, false, false ); Is there anything wrong with this statement ?? i have this code i need to close the parent.html window when the child window opened, i need the code for that working well in IE and Firefox Parent.html <HTML> <SCRIPT TYPE="text/javascript"> function sendTo() { window.open('child.html','_blank','resizable=yes,width='+(screen.width-500)+',height='+(screen.height-500)+''); } </SCRIPT> <BODY > <form name="form"> <input type="text" value="" name="text1" id="pdetails1"> <input type="text" value="" name="text1" id="pdetails2"> </br> <input type="submit" value="submit" onClick="sendTo()"> </BODY> </HTML> child.html <html> <body> <form> <input type=text name="text5" value=""> <input type=submit name="submit"value="submit"> </form> </body> </html> Hello all, and thank you for your coments, I want to preserve a 16/9 aspect ratio to the window after any resize, making the width a function of the height. As I have a window.resizeTo() inside the window.onresize event function, the infinite loop is served. How may I quit it? Code: <html><head><title>Title</title><script languaje="javascript"> const c_ra=16/9; window.onresize = function WindowReSize() { var myWidth = 0, myHeight = 0; if( typeof( window.innerWidth ) == 'number' ) { //Non-IE // myWidth = window.innerWidth; myHeight = window.innerHeight; } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { //IE 6+ in 'standards compliant mode' // myWidth = document.documentElement.clientWidth; myHeight = document.documentElement.clientHeight; } myWidth = Math.floor(myHeight*c_ra); window.resizeTo(myWidth,myHeight); // ** CAUTION resize event in a onresize event handler ! }; </script></head><body><p>Hello World</p></body></html> hello everybody i need your help and experience for having code to show ( overlay / modal window ) to the user when closing or navigating away from the page ( i want put in this window facebook share to make the user to share the page in his facebook ) , bytheway i wanna use it in my wordpress in every post could it be happen ? Thanks for helping Here is the program: http://www.1728.com/newwindow.htm Basically, I want to input a number in the input box, which assigns a number to the variable numval located at document.box1.b1. When clicking on the "new window" button, an alert displays the input box value, then another window opens and displays the integers 1 through 12 and the amount squared. I would like the new window to obtain the number from the previous window so that the new window will display integers (and their squares) from 1 to the value of numval. Hi All, I need to show/focus the parent window which is in back when click a link from child window in Chrome.This problem is in Chrome browser only. We have used the below code self.blur(); Window.opener.focus(); But this is not working in Google Chrome. Please suggest me some workaround to achieve this. Thanks in Advance Reply With Quote 12-19-2014, 09:26 PM #2 Old Pedant View Profile View Forum Posts Supreme Master coder! Join Date Feb 2009 Posts 28,311 Thanks 82 Thanked 4,754 Times in 4,716 Posts Window is not defined. window is. JavaScript (and the DOM) is case sensitive. You must pay attention to upper/lower case spelling, carefully. By the way, you shouldn't need the blur() call. If you focus on some window (any window) then any other focus should be lost. Hi Ive found out how to force another browser window to open at a certain size when a link is clicked. Here's the whole line of code including the layer, the javascript and the image, <div id="Layer6" style="position:absolute; width:10px; height:8px; z-index:6; left: 561px; top: 310px"><a href="javascript:;" onClick="MM_openBrWindow('navigation%20instructions.htm','','width=50,height=50')"><img src="images/info.gif" width="15" height="15" border="0"></a></div> How do I adapt this so I can also specify the x&y co-ordinates of the opened window relative to the window that launched it. thanks alot Masten I am looking to have a link open a closeable window that is contained within a browser window. If you click on the "sizing charts" link on this website, this is exactly what I am looking to do: http://www.bella.com/mapper.php?pageid=40 The window is contained within the current browser window, it can be dragged around, but not outside the parameters of the browser window. Is there a title for this technique that I can research? Not looking to waste anybodys time, but if I can get steered in the right direction it would be greatly appreciated. Thanks |