calling Struts action Using phoneGap - iphone

i m new to phonegap, can please anyone tell me what will be the jquery.ajax/jquery.post call structure for getting the data from action class? or in other words what i have to give in URL attribute of call? to call action of server from mobile page?
thanx

Please take a look at http://api.jquery.com/jQuery.post/ to know how to make ajax calls using jquery.
In general URL would be < action name >.do (.action depends on struts config property) unless you are trying to access cross domain site.
Parameters are specified in data field.
Hope this answer helps you.

Related

Is it possible to create a MVC application that navigates like Facebook?

Facebook seems to have a single page where the content changes based on user interaction.
For example: If I click on somebody's post, the url changes to the user's profile/posts/.
Now I'm sure this is possible to implement on MVC.
Can somebody help me get started?
Perhaps some reference/sameple/tutorial (I believe this will heavily involve configuring the routings).
Sure, that's called Custom Routing. You can set up custom routing in the routeconfig.cs file in your project (for pre-MVC4, routing is in Gloabal.asax). Then you just use an Actionlink Helper to build your links.
Read More: http://www.codeproject.com/Articles/641783/Customizing-Routes-in-ASP-NET-MVC

How to call wicket page from servlet

My application is mixed of wicket and jsp page . In my case i have to call wicket page from servlet with some value in request object . could someone please explain as how to achieve this. Thanks
What do you mean 'call a wicket page'? Do you mean load a wicket page to the user after he performs some action on the servlet-loaded page?
What exactly is your use case for this?
I think it would be better NOT to mix jsp and wicket, but given that you did:
BookmarkablePages provide a way to directly address a wicket page as it has a bookmarkable url (for instance, /home instead of /page?13). We use those to load a certain page with certain request parameters (ie, /student/1234/results shows the resultpage for student 1234).
Also, you could implement some kind of listener service that, based upon a certain call/payload, constructs a wicket page and returns the url for that page but that seems a bit overkill. In most cases I think bookmarkable pages a should suffice.
Have a look at http://wicket.apache.org/apidocs/1.5/org/apache/wicket/protocol/http/WebApplication.html#mountPage(java.lang.String, java.lang.Class)
or
http://wicketinaction.com/2011/07/wicket-1-5-mounting-pages/

Form (phpmailer) in joomla error

I'm having the following problem, i created a folder (named 'forms') to storage the files of phpmailer, then i have to put the action in the form this way: action="forms/mail.php".
But when i tried the form it open a not found page e in the url it appears this: "perfilo/index.php/forms/mail.php", i tried to delete the part "index.php/" and execute the script and it looks like would work without it.
Can anyone tell me how to get rid of this "index.php/" part? Am i doing something wrong or what?
Thanks
You are on the wrong track.
Search for documentation on using Joomla! Mailer.
Some resources to get you started:
JFactory/getMailer
How To Send Email from Your Joomla Extension
You are on the wrong path.
In joomla you need to implement a contact form.You can implement it like following.
Joomla Provides you a default component com_contact Any of the files from com_contact\views\contact\tmpl\ or you can create new layout with your custom design.
And you can access the files in url via wwww.domain.com/index.php?option=com_contact&view=contact&layout=default or your custom layout.
then joomla itself providing some forms if you want to customize that you can do that too.
The action they set in the form to contact controller. and sending the mail.
I got your point of view you are trying to create custom design and set it as article .
If you want to follow your own method.
You can work like this.
the form action leave as empty.
and onclick you have to set the action via jquery and then submit
Hope this may solve your issues

zend framework redirector->gotoUrl() with target=_blank

On submitting a form I want to sent my visitor to an external url to do something but hope he will continue browsing my site afterwards. In html I would give him that opportunity with href="http://www.example.com" target="_blank".
But I cannot find how to do that when I do:
$this->_helper->redirector->gotoUrl('http://www.example.com');
within my controller action. Nothing found in Google, documentation nor SO. Is it just not possible?
Not possible. You can't tell the browser what to do in this scenario.
You can achieve that effect with the help of Javascript:
submit the form
on success, open a new tab with the external page with JS
redirect to a new location within your app on the old tab
It is possible now:
$link = new PTA_Link();
$link->setTarget('_blank');

Does anybody know if there's a way to modify the action attribute of the wp-login.php?action=register form?

I'm trying to create a reference registration system in Wordpress. The idea is that the user will click a link which will contain wp-login.php?action=register&ref=12345
I'm hooking into the 'register_form' action hook and adding a reference number hidden input and on registration use that reference number to do whatever i need to do with it.
The issue appears when the user gets something wrong in the registration form. The problem is that he will be taken to wherever the action attribute of the register form states which is "wp-login.php?action=register" without the ref parameter. I'm looking for a way to modify that action attribute. I've looked in the wp-login.php file and it seems that there's no filter there.
I know there's always javascript, but is there another wordpressy way to do this?
I think you'll get tons of clues from this affiliates plugin, you can download it and checkout the code from http://wordpress.org/extend/plugins/affiliates/
Good luck,
Virgil!