|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Testing
I've been trying to test a wml page I made on a few different online 'simulators'. But sometimes I can get it to work on the simulator, but when I test it on a real phone (samsung) I get an error.
Does anyone have a link to a good simulator that will catch those errors and deliver accurate results? |
|
#2
|
||||
|
||||
|
There is an online validator at http://www.w3schools.com.
If you use firefox, you can install the wml browser extension, that is great for error checking - also, you can also test local at htmlhelp. Opera browser too can view wml, so that can be used for checking too.
__________________
Cheers, Jamie # skiFFie | Home of the 'accessibility module' for Drupal # Jamie Burns [me] Accessibility Module [drupal] # guidelines | search | wap resources | not getting help | fold to cure # Any form of employment is strictly prohibited ...... __________________ Let the might of your compassion arise to bring a quick end to the flowing stream of the blood and tears ..... Please hear my anguished words of truth. __________________ |
|
#3
|
|||
|
|||
|
Here's the thing... the code validates, but it still doesn't work on the actual phone...
I noticed when I tested it before, it wouldn't work if I had <br /> tags in there. After I took those out I got it working. But that was with just static content. When I tried to import some dynamic stuff with php it stopped working on the phone. But it works fine on the browser simulator and the code validates on the W3Cschool site. Here's my code.. any ideas? Code:
<?php
header('Content-Type: text/vnd.wap.wml');
print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
// then escape to normal xml
?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<?php
$host="***";
$user="***";
$password="***";
$db = mysql_pconnect($host,$user,$password)
or die("no good");
mysql_select_db("***",$db);
$sql = mysql_query("SELECT sid, title
FROM info
ORDER BY sid DESC
LIMIT 7
");
$row = mysql_fetch_array($sql);
?>
<wml>
<card id="home">
<p><strong>Welcome!</strong></p>
<?php do { ?>
<p><small>- <a href="#<?php echo $row['sid']?>"><?php echo $row['title']; ?></a></small></p>
<?php } while($row = mysql_fetch_array($sql)); ?>
<p><small>Powered by snail</small></p>
</card>
</wml>
|
|
#4
|
||||
|
||||
|
Do you have a live page to test?
Are you getting some weird characters from the DB, I notice you use UTF-8? What error do you get on your phone? May make a difference, may not, but you could try changing your first line to PHP Code:
|
|
#5
|
|||
|
|||
|
should I delete the encoding line? UTF-8
|
|
#6
|
||||
|
||||
|
You could just change it to : ISO-8859-1 if that it your character set...
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > WAP Programming > Testing |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|