Question: I am using Fancybox for showing html files with ajax in [removed] and after struggling to make it work in IE now it is showing the wrong width.

```
$(document).ready(function() {
    $(".loginmodal").fancybox({
        'transitionIn'  : 'elastic',
        'transitionOut' : 'elastic',
        'width'         : 350
    });

    $(".agregardefmago").fancybox({
        'transitionIn'  : 'elastic',
        'transitionOut' : 'elastic',
        'padding': 0,
        'margin':0,
        'autoScale':false,
        'width'         : 350,
        'type'          : 'ajax'
    });

});

```

This is the javascript in the header with:

```
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
<script type="text/javascript" src="/static/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<link rel="stylesheet" type="text/css" href="/static/fancybox/jquery.fancybox-1.3.4.css" media="screen" />

```

When clicking on `<a href="/agregar-definicion.html" class="agregardefmago">Agregar Definicion</a>` the fancybox appears with a correct automatically height but a wrong width.

I have tried removing the 'width' attribute, and many other combinations.

Thanks.

Answer: 
Set the OK Button to have an OnClickListener

```
public void onCreate(Bundle savedInstanceState) {
View okButton = findViewById(R.id.okButtonImg); //assume you are using custom img for OK
okButton.setOnClickListener(okButtonListener);
}

```

In the Click Listener invoke an Intent.
In the Intent you can pass information using "putExtra"

```
        private OnClickListener okButtonListener = new OnClickListener() {

            public void onClick(View v) {
            Intent secondPageIntent = new Intent(getBaseContext(), SecondPage.class);
            secondPageIntent.putExtra("PASSVALUE","ANY  STRING HERE");
            startActivity(secondPageIntent);

            }
     };

```

In the second page use getExtras("PASSVALUE") to retrieve data that you passed 

See this post for more details
<http://mylifewithandroid.blogspot.com/2007/12/playing-with-intents.html>
Answer-1)
---------

For that you need to pass the value in intent and that value you get in another activity.

```
Intent i = new Intent(YourCurrentActivity.this,YourCallingActivity.this);
i.putExtra("key", YourValueToPassAnotherActivity);
startActivity(i);

```

Now you can get this value in your calling activity using bundle.

```
Bundle b = getIntent().getExtras();
b.getString("key");

```

Answer-2)
---------

For that you need to create custom title bar.
This might help you

<http://oo-androidnews.blogspot.com/2010/03/android-how-to-add-custom-title-bar.html>