Jump to content

RetroSPV - Free SMS


Recommended Posts

Guest ajb3000
Posted

I'm trying to personalise the page and have made some changes, but being a relative newb to raw html editing, could someone briefly explane what the following does:

function textCounter(field,cntfield,maxlimit) {

if (field.value.length > maxlimit) // if too long...trim it!

field.value = field.value.substring(0, maxlimit);

// otherwise, update 'characters left' counter

else

cntfield.value = maxlimit - field.value.length;

}

// End -->

function MM_findObj(n, d) { //v4.01

var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i

for(i=0;!x&&d.layers&&i

if(!x && d.getElementById) x=d.getElementById(n); return x;

}

function MM_validateForm() { //v4.0

var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;

for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args);

if (val) { nm=val.name; if ((val=val.value)!="") {

if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');

if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.n';

} else if (test!='R') { num = parseFloat(val);

if (isNaN(val)) errors+='- '+nm+' must contain a number.n';

if (test.indexOf('inRange') != -1) { p=test.indexOf(':');

min=test.substring(8,p); max=test.substring(p+1);

if (num

} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.n'; }

} if (errors) alert('The following error(s) occurred:n'+errors);

document.MM_returnValue = (errors == '');

Thanx

Guest Monolithix [MVP]
Posted

That's all javascript, which i can't write, so i can't help

Sorry :/

Posted

That's java script.

The first "paragraph" sorts out the number of characters left.

The third bit makes sure all the bits on the form are filled in when the user clicks submit.

Not a js genius, so can someone fill in the second bit?

Guest ajb3000
Posted

ok, so it's fine to leave all that in then. My next question is on redirecting to another page after sending a message, so far I have:

It sends correctly but tries to load the page "sent.html" on the server, how can I get it to load this page locally from the same directory the original file is placed in?

Once I have finished this I will upload here for other people to use, it's basically going to be a slightly tidier version of Pauls, that only uses the GPRS for sending the actual message, hence extremely cheap SMS!!

Guest ajb3000
Posted

lol, no offence intended, I just want it to include my number be default in the 'from' field, and have all the boxes line up neatly etc, plus have everything stored locally so I can create an item in the menu for sending sms via gprs.

Guest Monolithix [MVP]
Posted

What do you mean by "on the server" and "locally", surely you want all the pages server-side...

Posted
What do you mean by "on the server" and "locally", surely you want all the pages server-side...

To reduce GPRS you'd want as many pages as possible locally, except for the page which actually executes the sending of SMS.

Guest Monolithix [MVP]
Posted

Missed the two posts previous to mine ;p

Guest ajb3000
Posted

yea, 'on the server' is basically the remote page where the sms is sent to, after it's sent I want it to link to another page stored 'locally' on the phone itself.

Guest Monolithix [MVP]
Posted

Yeah i see now sorry, those two posts previous ot mine were posted while i wrote mine, and i don't always view my own posts.

All i can suggest is putting the full file location, so something like "file://IPSMApplication dataSMS htmlsent.html" (or where ever its stored) perhaps?

Posted
Yeah i see now sorry, those two posts previous ot mine were posted while i wrote mine, and i don't always view my own posts.

It's ok. I'll let you off, humble servant. Now polish my shoes :)

Yep the file:// path should work.

file://IPSM is the format of it.

Posted

Sorry, just confirming it - took me a whole three minutes to copy that html over and find the path IE references to.

Haven't got much more exciting stuff to do when the update is hours away.

Although, the Orange Academy Film Awards are on BBC1 now...

Guest ajb3000
Posted

still seems to come up with page cannot be found, the messages are sending correctly.

Guest ajb3000
Posted

sorry, a couple more questions, does anyone know how to set it so that you cannot write more than 160 characters in the text box, or even better display some sort of counter when typing? (counter from original doesn't work on SPV)

someone really needs to write a proper program to do this.

Guest ajb3000
Posted

got the character limit sorted, my only problem now is loading a second html page locally after submitting the message to retrospv. it always comes up with page cannot be found (looking for it on the retrospv server).

Guest Monolithix [MVP]
Posted

The full file location ~isnt~ working?

Guest ajb3000
Posted

Thanx, I've closed the tag but it still doesn't seem to work. Try creating the files on your SPV and see if you can get it working.

EDIT: Linking to a website works fine, but it just won't let me link to a local file.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.