save button does no work

General Crossword Compiler discussion

Moderator: domino

save button does no work

Postby lars m » Thu Jun 19, 2008 8:07 pm

I have been working with the save feature the last few days, but cannot even make the button work. My submit button functions nicely, and when I put the saveme.pl string into the submit URL, the submit button finds my saveme.pl file in my CGI-bin without any problems. But the save button does not activate anything at all - no matter what URL I set in the applet properties. Please test if the save button functions as it should.
lars m
 
Posts: 55
Joined: Sat Nov 17, 2007 2:34 pm
Location: Denmark

Re: save button does no work

Postby Antony Lewis » Thu Jun 19, 2008 9:57 pm

You can try it, e.g. at

http://crossword.info/sample/american_demo

(on that site implemented with cookies).

Do you have %PROGRESS% in your URL as a placeholder?
Antony Lewis
Site Admin
 
Posts: 746
Joined: Sat Sep 25, 2004 3:32 pm
Location: Site Admin

Postby lars m » Fri Jun 20, 2008 11:05 pm

Yes that is just what I want. But I cannot even make the buttons work. In principle, shouldn't the send and save button get me any URL entered into URL tab in the applet properties in "export to files" ? I cannot achieve that. When I enter the URL of my scripts in my CGI-bin manually in my browser, it finds them without any problems. When I try to make the buttons do that for me, nothing happens.
lars m
 
Posts: 55
Joined: Sat Nov 17, 2007 2:34 pm
Location: Denmark

Postby Antony Lewis » Sat Jun 21, 2008 8:18 am

Ah, at the moment it seems to only work with applet parameters rather than via the URL exported into the puzzle file. Try the latest applet file at

http://crossword.info/jar/ccjava.jar
Antony Lewis
Site Admin
 
Posts: 746
Joined: Sat Sep 25, 2004 3:32 pm
Location: Site Admin

Postby lars m » Sat Jun 21, 2008 9:19 am

That link generates 4 folders and a class file when unzipped. Should I just put those files into a directory on my webserver ? I tried that but it still doesn't work.
lars m
 
Posts: 55
Joined: Sat Nov 17, 2007 2:34 pm
Location: Denmark

Postby Antony Lewis » Sat Jun 21, 2008 10:20 pm

Don't unzip it - you just want the .jar file (replace the one supplied with Crossword Compiler).
Antony Lewis
Site Admin
 
Posts: 746
Joined: Sat Sep 25, 2004 3:32 pm
Location: Site Admin

Postby domino » Sun Jun 22, 2008 9:26 am

Replacing the JAR file doesn`t seem to have solved the problem - except that the save button now at least activates the scripts in the correct sense and with the crossword data...

However the stored data isn`t subsequently passed back to the crossword. Refreshing/F5ing etc doesn`t help.
domino
 
Posts: 56
Joined: Sun Sep 26, 2004 10:24 pm
Location: Notts UK

Postby Antony Lewis » Sun Jun 22, 2008 11:08 am

It's up to your web scripts how you handle loading of saved puzzles (i.e. loading a new page with the PROGRESS parameter in the applet tags)
Antony Lewis
Site Admin
 
Posts: 746
Joined: Sat Sep 25, 2004 3:32 pm
Location: Site Admin

Postby lars m » Sun Jun 22, 2008 11:41 am

I don't know if I am crazy. I just don't find the ccjava.jar in that file you asked me to download.
lars m
 
Posts: 55
Joined: Sat Nov 17, 2007 2:34 pm
Location: Denmark

Postby Antony Lewis » Sun Jun 22, 2008 12:47 pm

That's the file you downloaded - if you unzipped it, it was the file you were unzipping.

In most browsers you can right click on

http://crossword.info/jar/ccjava.jar

and select "Save link as" (or similar) to save the file to your hard disk.
Antony Lewis
Site Admin
 
Posts: 746
Joined: Sat Sep 25, 2004 3:32 pm
Location: Site Admin

Postby domino » Sun Jun 22, 2008 2:57 pm

I picked up the new .jar OK and had another go at the whole thing from scratch...

The scripts seem to be doing their thing OK and if I view source on the target crossword page I can see.


<PARAM NAME='PROGRESS' VALUE='------CAT----------DOG----------------------HORSE--------------------------------------------------------------------'>

I just can`t seem to get it to re-populate the grid.

I`ll give it a rest for a while and have another go later.. as I am probably missing something ...

It used to work straight out the box on V6 & V7 but I`ve never managed to get it save on V8 for some reason... even with the new options checked or otherwise.
domino
 
Posts: 56
Joined: Sun Sep 26, 2004 10:24 pm
Location: Notts UK

Postby lars m » Mon Jun 23, 2008 9:52 am

OK I managed to download as a jar file with Firefox instead of IE7. Now the buttons activate the scripts.

Now I am almost as far as domino. I got the saveme.pl and showpuz.pl in place in my cgi-bin which is the only place where perl script is executable on my webserver. (And my submitme.pl works nicely here). The only thing I have changed in the scripts is the perl path, so it complies with my webserver.

In my puzzle html (..test.html) I got the %progress% between the applet tags by means of the "save enabled" template supplied by you:

<applet class="CCJava" code="Grid_int.class"
archive="ccjava.jar" name="CCXWORD" height="768"
width="835">
<param name="DATAFILE" value="test.jpz"><!--[CCPROGRESS]-->
You need Java enabled to view the crossword applet.
</applet

I got the following in my "saveme" url:

http://www.sprogkryds.dk/cgi-bin/saveme.pl?
http://www.sprogkryds.dk/cgi-bin/showpuz.pl?
../puzzles/demos/test.html%progress%

But when I click the save button in the puzzle, it is not saving any words in the saveme.pl.

Do you have any suggestions where to look to bring this a step further ?
lars m
 
Posts: 55
Joined: Sat Nov 17, 2007 2:34 pm
Location: Denmark

Postby Antony Lewis » Mon Jun 23, 2008 7:14 pm

%progress% needs to be upper case and you seem to be missing the question mark.

These sample scripts are pretty old now, I'd probably do it somewhat differently now.
Antony Lewis
Site Admin
 
Posts: 746
Joined: Sat Sep 25, 2004 3:32 pm
Location: Site Admin

Postby lars m » Tue Jun 24, 2008 7:40 am

Thanks. It helped with %PROGRESS% in upper case. I am now getting a bit more than the sample, http://www.crossword-compiler.com/users/appletdemo/Camb.html that is just returning a blank page.

The save button is now saving the puzzle solution data in the saveme.pl, and when I am activating the link I am actually directed back to the the correct puzzle html, but it is not able to show the java puzzle - instead it is just showing the blank square with an X in the upper left corner. To me it looks like it is not able to activate the java.jar, but I am not sure. Any suggestions how to move on, please ??

The url looks like this with XYLITOL as the saved data:

http://www.sprogkryds.dk/cgi-bin/showpu ... ----------

See the puzzle here http://www.sprogkryds.dk/index/test.html
lars m
 
Posts: 55
Joined: Sat Nov 17, 2007 2:34 pm
Location: Denmark

Postby Antony Lewis » Wed Jun 25, 2008 3:15 pm

The easiest thing is to have all scripts in the same folder, otherwise you may need to change the CODEBASE for the location of the .jar file and put in a path to the location of the puzzle file.
Antony Lewis
Site Admin
 
Posts: 746
Joined: Sat Sep 25, 2004 3:32 pm
Location: Site Admin

Next

Return to User discussion

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron