473,749 Members | 2,486 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can't get script to work with images and without date f(x)

tpgames
785 Contributor
I'm trying to make the code work with images, and work without using dates. I'm trying to alter someone elses script. The board doesn't show up with images. Thanks!

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2. var sUnsolvedSudoku
  3. var sSolvedSudoku
  4. var sStyle
  5. var sHeader
  6. var sTodaysDate
  7. var d_names = new Array("Sunday", "Monday", "Tuesday","Wednesday", "Thursday", "Friday", "Saturday");
  8. var d = new Date();
  9. var curr_day = d.getDay();
  10. var curr_date = d.getDate();
  11. var curr_month = d.getMonth() + 1;
  12. var curr_year = d.getFullYear();
  13. var sSourceName
  14. var sDiffSetting;
  15. var sPrintDescription;
  16. var sPrizeCaption = "\n\nThis picture is: Mastering tree climbing";
  17. var IsSupportingMember;
  18. var bEnterYourOwnPuzzle = false;
  19. var IntervalTimes = new Array(81);
  20. for (i=0; i <=81; i++)
  21. { IntervalTimes[i]=new Array(4);
  22.  IntervalTimes[i][2] = 0;
  23.  IntervalTimes[i][3] ='';
  24.  IntervalTimes[i][4] =''; }
  25. var sQueryString = unescape(location.search);
  26. var Undos = new Array(200);
  27. var UndosCurr;
  28. UndosCurr=1;
  29. IsSupportingMember=false;
  30. sQueryString = sQueryString.replace('?','');
  31. sDiffSetting = 'A';
  32. sSourceName = '13-2-2007.js';
  33. sTodaysDate = '13-2-2007';
  34. sUnsolvedSudoku ="<table class=sudokutable><tr><td class=bdr00>3</td><td class=bdr10>1</td><td class=bdr00>2</td><td class=bdr10>4</td></tr><tr><td class=bdr01>&nbsp;</td><td class=bdr11>2</td><td class=bdr01>&nbsp;</td><td class=bdr11>&nbsp;</td></tr><tr><td class=bdr00>&nbsp;</td><td class=bdr10>&nbsp;</td><td class=bdr00>4</td><td class=bdr10>&nbsp;</td></tr><tr><td class=bdr01>1</td><td class=bdr11>4</td><td class=bdr01>3</td><td class=bdr11>2</td></tr></table><div>Sudoku provided by Sudoku.com.au</div>";
  35. sSolvedSudoku ="<table class=sudokutable><tr><td class=bdr00>3</td><td class=bdr10>1</td><td class=bdr00>2</td><td class=bdr10>4</td></tr><tr><td class=bdr01>4</td><td class=bdr11>2</td><td class=bdr01>1</td><td class=bdr11>3</td></tr><tr><td class=bdr00>2</td><td class=bdr10>3</td><td class=bdr00>4</td><td class=bdr10>1</td></tr><tr><td class=bdr01>1</td><td class=bdr11>4</td><td class=bdr01>3</td><td class=bdr11>2</td></tr></table><div>Sudoku provided by Sudoku.com.au</div>";
  36.  
  37. var UseAry=ImgAry;
  38. var ImgPath='http://www.tpgames.net/gaming/2/puzzlers/sudoku/';
  39. var iGridUnsolved= new ImgArray(3.gif,1.gif,2.gif,4.gif,0.gif,2.gif,0.gif,0.gif,0.gif,0.gif,4.gif,0.gif,1.gif,4.gif,3.gif,2.gif);
  40. var iGridSolved= new ImgArray(3.gif,1.gif,2.gif,4.gif,4.gif,2.gif,1.gif,3.gif,2.gif,3.gif,4.gif,1.gif,1.gif,4.gif,3.gif,2.gif);
  41. var sPuzzleID = 'Puzzle #5927 - ';
  42.  
Expand|Select|Wrap|Line Numbers
  1. if (window.top!=window.self) 
  2. window.top.location="/trial/iaukids.html";
  3. var iPlayerMoves = new ImgArray(80);
  4. var iCurNum;
  5. iCurNum = 1;
  6. var sBGColor = '#e9e9e9';
  7. var sSqMarkColor = '#e7ffd5';
  8. </script>
  9.  
Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  2.  var months = new ImgArray(13);
  3.   months[0] = "January";
  4.   months[1] = "February";
  5.   months[2] = "March";
  6.   months[3] = "April";
  7.   months[4] = "May";
  8.   months[5] = "June";
  9.   months[6] = "July";
  10.   months[7] = "August";
  11.   months[8] = "September";
  12.   months[9] = "October";
  13.   months[10] = "November";
  14.   months[11] = "December";
  15.   var monthname  = months[sTodaysDate.split('-')[1]-1];
  16. if (sTodaysDate)
  17. document.write('Sudoku for ' + sTodaysDate.split('-')[0] + '/' + monthname + '/' + sTodaysDate.split('-')[2]);
  18. else
  19. document.write('Enter your own sudoku puzzle.')
  20. function ChangeBoard()
  21. {
  22. var oCtl;
  23. var iX;
  24. var iY;
  25. var iSize;
  26. oCtl = document.getElementById('sudokutable');
  27. switch (oCtl.height) {
  28. case '360' :
  29. case '360px' :
  30. iSize = 36
  31. oCtl.height='324px';
  32. document.getElementById('sudokutableBox').style.width='324px';
  33. document.getElementById('sudokutableBox').style.height='324px';
  34. break;
  35. case '324' :
  36. case '324px' :
  37. iSize = 30
  38. oCtl.height='270px';
  39. document.getElementById('sudokutableBox').style.width='270px';
  40. document.getElementById('sudokutableBox').style.height='270px';
  41. break;
  42. case '270' :
  43. case '270px' :
  44. iSize = 40
  45. oCtl.height='360px';
  46. document.getElementById('sudokutableBox').style.width='360px';
  47. document.getElementById('sudokutableBox').style.height='360px';
  48. break;
  49. default :
  50. iSize = 36
  51. oCtl.height='324px';
  52. document.getElementById('sudokutableBox').style.width='324px';
  53. document.getElementById('sudokutableBox').style.height='324px';
  54. break;
  55. }
  56. SetCellSize(oCtl,iSize);
  57. }
  58. function SetCellSize(oCtl,iSize)
  59. {
  60. var iX;
  61. var iY;
  62. for (iX=0;iX<=oCtl.rows.length-1;iX++)
  63. {
  64. for (iY=0;iY<=oCtl.rows.length-1;iY++)
  65. {
  66. oCtl.rows[iY].cells[iX].height=iSize + 'px';
  67. }
  68. }
  69. }
  70. </script>
Feb 13 '07 #1
4 1272
tpgames
785 Contributor
Here's a link to the JavaScript file
I'm a complete newbie and don't understand JS very well.
Feb 13 '07 #2
acoder
16,027 Recognized Expert Moderator MVP
The link doesn't work.
Feb 13 '07 #3
tpgames
785 Contributor
I had to get adminstrater to fix the link, and should have simply reposted it as they have a silly 5 minute timer for editing posts. I had forgotten to move the file before posting the link. Sorry! (Obviously, they haven't fixed the link yet.)

Heres the correct link to the JavaScript file:
New Link
Feb 14 '07 #4
tpgames
785 Contributor
This question is still valid as I have not figured out an answer yet. thanks.
Mar 5 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
4818
by: Allen | last post by:
I am trying to add an additional photo/hyperlink to the company web site (I didn't create it) without any luck. The mouseover feature 'highlights' pics by swapping them with another pic using this command in some type of array. I added the mailbox in the lower left corner (see link below)http://www.aamechanical.com/indextemp.htm but I cannot get it to swap. Here is the code for the page: Thanks for your help in advance
3
7157
by: bigoxygen | last post by:
Hi. I have a list that is similar to this: -Evaluation +test +test -Students +test I would like to change the "-" bullet only, but I cannot. My
13
2366
by: LRW | last post by:
Having a problem getting a onSubmit function to work, to where it popsup a confirmation depending on which radiobutton is selected. Here's what I have: function checkdel() { if (document.getElementById"].value=='1') { confirm('Are you sure you want to delete this file?'); } } ......
1
1902
by: Rob | last post by:
Access Gurus, This script was used to view the reports on the web by choosing a date on or before the current day.Recently it stopped working and i am not able to figure where the problem is. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"> <HTML lang=en xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> <HEAD>
9
3347
by: WRH | last post by:
Hello I am new to asp but I made some Jscript functions which work fine. The functions contain some strings used as a registration key for some apps. It is important that these strings not be visible to a client using a browser. My question is...can a knowledgeable browser user view Jscript source code in an asp file?
6
9251
by: Gordowey | last post by:
Where can I find this DIV effect. go to: http://www.amazon.com Put mouse over the text "See All 32 Product Categories" (Top-Middle)..it will open a window with a cool effect... does anyone know where to find a script with this effect.... thanks
13
2135
by: Andy Baxter | last post by:
Can anyone recommend a good online guide to using objects in javascript? The book I bought (DHTML Utopia) suggests using objects to keep the code clean and stop namespace clashes between different parts of the code, but as far as I can see, the way objects work in javascript is quite awkward. I had it working the way they suggest in the book, and it was going OK until I wanted to call one object method from another - I couldn't find a...
1
1716
by: rfr | last post by:
Apparently the Transitional Doctype kills this script because the script does not make proper use of units like "px". It works well without a doctype statement. But once someone adds a transitional doctype, the js script no longer works. Can someone familiar with javascript bring it up-to-date so that it works with current doctypes and post it here for others to make use of? The whole HTML document including the js scrip follows (...
4
4586
by: zion4ever | last post by:
Hello good people, Please bear with me as this is my first post and I am relative new to ASP. I do have VB6 experience. I have a form which enables users within our company to do an intranet reservation of available resources (laptops, beamers, etc). The MySql database queries are already in place, as is the ASP administration panel. The frontend that users will see however, still needs some work. I'm really close, but since I'm no...
0
8996
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8832
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9388
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9333
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9254
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4608
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.