473,396 Members | 1,754 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

tpgames
785 512MB
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 1257
tpgames
785 512MB
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 Expert Mod 8TB
The link doesn't work.
Feb 13 '07 #3
tpgames
785 512MB
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 512MB
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
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...
3
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
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...
1
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. ...
9
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...
6
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...
13
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...
1
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...
4
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.