knowing the port number

Any ash function/trick to get this?

Using visit_url() I'm fine without, because mafia automatically prepends the lead data, but I'm trying to find a way to hard write the url into a relay overrides HTML (well, javascript) so that the page can submit data back through mafia without triggering a page refresh. Is this the way to do it or would I want instead to know the server number that I'm connected on and send the data to KoL directly? Or am I totally screwed and all actions would cause the page to refresh?
Or is there a Fourth option that achieves this amazingly simpler that I'm overlooking/unaware of?
 
I can't think of any way, other than perhaps a call & parse of api.php (but don't remember that being listed). Though, doesn't putting your javascript in the onClick() of a form button that doesn't have an action / has a blank action associated work? (I'm a bit rusty, it may not.)
 
The never-quite-finished WOSSMAN uses AJAX to talk to itself, just as if mafia were the server. Thus variables are edited-in-place without a complete page reload. I'm not exactly clear on why you don't want a page refresh but it might be worth a look.
 
I'm making a relay override for messages.php (and in such making sendmessage.php obsolete) to give it a complete makeover.

Think of a gmail-esque layout. But I don't want to have to do a full page refresh everytime the user clicks a different box, or a different conversation to expand. Granted the page refresh makes no server hits, the time it takes for mafia to recreate the page is noticeable and sometimes spacing issues occur which get awkward. (That and things like sending out a kmail [which would require talking back to the script] without reloading the page)


I foresee this project requiring a lot of time to make it look good, so if anybody knows some useful hints for HTML/Javascript/CSS that'd be awesome.

One big for-instance: A way to make a bunch of hidden <div>s (or more simply <td>s) [this part I can do] that merely get re-arranged and turned on on-screen based on various clicks [this part I can not].
 
That sounds awesome -- I've wished for that from time to time but never had the inclination to take a crack at it. Yeah, take a look at the WOSSMAN. The script is probably a bit hard to read since it's jQuery and HTML and CSS in ASH, and I didn't comment it well (or at all) but it basically does what you're talking about. You can use AJAX to make the script talk to itself without ever reloading the page.

What additional functionality are you adding? Message folders? Will you consolidate messages and trade requests in one list? Curious to hear your design ideas.
 
What additional functionality are you adding? Message folders? Will you consolidate messages and trade requests in one list? Curious to hear your design ideas.

Custom folders/filters for kmails; mass messaging (works); I'd -like- to implement the autofill feature for contact names, but ... that's way above me; threaded messaging (works); custom colors and various other options.
I have -no- experience with the PvP folder so if someone could tell me what it -contains- that would be awesome? Any outbound messages or all in? Player generated or system?

As for avoiding reloads I don't think that it'll be too much of a problem right now. I don't understand jQuery and would rather not learn it (in general or AJAX in specific) at this point in time. Currently I just take the KoL approach to layout and have it split the frame into two frames (all handled by the same ash file, conveniently).

Thanks hola for that link though, that will come in handy if/when I decide to take my own approach for handling script talk-back. I may even *gulp* attempt to decipher WOSSMAN.

EDIT: add files, and thanks to zarqon for the base of kmail.ash. Will probably end up rewriting the function to be more fluid for requests to the entire inbox.
THIS IS FAR FROM FINISHED, just throwing it up so you can see what I have so far. I recommend renaming it relay_Somethingorother.ash so you can still use all your messaging features in the mean time.
 

Attachments

Last edited:
As for avoiding reloads I don't think that it'll be too much of a problem right now. I don't understand jQuery and would rather not learn it (in general or AJAX in specific) at this point in time.
...
I may even *gulp* attempt to decipher WOSSMAN.

Then I believe we are at an impasse, good sir. (just about all of the JS in WOSSMAN involves jQuery to some extent.)
 
Last edited by a moderator:
Back
Top