I want to replace username string in id of "indirect" class with username specified by users in jquery dialog input field.Problem is i cant use this.id = this.id.replace('username', myvalue) coz $this will refer to the input element inside of jquery dialog ui.... Please help me to sort this out by any other method
<img src="images/AOL_button.png" id='http://openid.aol.com/username' class="indirect" />
<img src="images/google_button.png" id='https://www.username.google.com/accounts/o8/id' class="direct"/>
================================================================================
$(.indirect).click(function(){
$("#dialog").dialog({
buttons: {
"OK": function() {
if($('#username').val() == '') {
$('#username').focus();
} else {
var myvalue= $("#username").val();
var provider_url_post= // replace "username" in google id with myvalue
alert(provider_url_post);
})