Prasad
Prasad

Reputation: 59511

Using "Web Application Toolkit for Mobile Web Applications" for iPhone

I am using the Web Application Toolkit for Mobile Web Applications to develop a simple website (which allows to update the users) for Windows 7 Mobile and iPhone using asp.net MVC.

I am using the ibbdemo as simulator to test for iPhone.

I have been facing few issues with this.

  1. Javascript/Jquery is not working (I have tried to set the textbox value in document.ready in a plain page with just a textbox)
  2. Form Collection of radio button returns all the values in comma separated, not only the selected one.

Edit:

I am trying to do the following after the admin logs in to website:

  1. Show links like Active Users and Inactive Users(Main/Index).
  2. Once the Admin clicks the Active Users link, then the list of active users will be shown (User/Active)
  3. On Clicking the Name of the user, the page to update the User details like Name, Sex, Email,... will be shown (User/Detail)

The javascript works till the 1st step, from 2nd step, it doesn't do anything. I have tried adding a dummy textbox in (Main/Index) page and set the value in document.ready, it worked. But when i do the same in (User/Active) or (User/Detail), the javascript/jquery doesn't seem to work. To Test, I have copied the first page content to all of them, but still it works in first page but not in rest. I am puzzled with this issue.

Here is the html that looks in (Main/Index):

     <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Mobile/iPhone/Site.Master"
        Inherits="System.Web.Mvc.ViewPage" %>

    <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
        <div class="toolbar">
            <h1 id="pageTitle">
            </h1>
            <a id="backButton" class="button" href="#"></a>
        </div>
        <form id="dashboardForm" action="Main/Index" method="get" title="Dashboard" class="panel"
        selected="true">
        <fieldset>
 <div class="row">
            <label>
                Dummy:</label>
            <%= Html.TextBox("dummyText") %>
        </div>
            <div class="row">
                <label>
                    Users: <a href="/User/Detail?IsNew=true">Add</a></label>
            </div>
            <div class="row">
                <a href="/User/Active">Active Users</a> <a href="/User/Inactive">Inactive Users</a>
            </div>
        </fieldset>
        </form>

<script type="text/javascript" language="javascript">

        $(function() {
            $("#dummyText").val('test');
        });
    </script>
    </asp:Content>

Is there any work around or did anyone face the same problem and found a solution for this?

Or is there any another toolikit for developing mobile apps using asp.net MVC, please suggest

Upvotes: 0

Views: 416

Answers (1)

Mic
Mic

Reputation: 25164

There is a mode in Safari(the browser from Apple), that lets you emulate Mobile Safari, the browser of the iPhone.

In the menus, find Develop -> User Agent and choose the browser you want to emulate.

Upvotes: 1

Related Questions