Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

498
Vistas
How to send parameters in $ .get?

I want to send two parameters in $ .get to the onget page, but these two parameters will be sent blank. Did I pass wrong in $ .get? My question is, did I pass these parameters correctly in $ .get?

 function DeleteEpisode(episodeid) {
  var corseid = document.getElementById("corseidfordelete").value;
Swal.fire({
title: 'delet؟',
showDenyButton: true,
confirmButtonText: 'yes',
denyButtonText: `no`,
}).then((result) => {
if (result.isConfirmed) {
    Swal.fire('save!', '', 'success').then((r) => {
        if (r.isConfirmed)
        {   
            $.get("/Admin/Courses/IndexEpisode/? 
         id="+corseid+"episodeid="+episodeid);                              
        }
    })                           
} else if (result.isDenied) {
    Swal.fire('error', '', 'info')
}
}) };

Method onget

   public void OnGet(long id,long episodeid=0 )
    { 
      _CourseEpisodeApplication.DeleteEpisode(episodeid);
      courseid=id;
      lstEpisode=_CourseEpisodeApplication.GetCourseEpisode(id);                                                       
    }
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You have two errors.
First one is that you did not specify the query separator & in your URI
Here is the fixed one.

$.get("/Admin/Courses/IndexEpisode/?id="+corseid+"&episodeid="+episodeid);     

Secondly, based on your code. The browser will throw an error due to unescaped break line.

$.get("/Admin/Courses/IndexEpisode/?  <---
       -->  id="+corseid+"episodeid="+episodeid);     

For future reference, just use jQuery PlainObject

 $.get('/Admin/Courses/IndexEpisode/', {
        id: corseid,
        episodeid: episodeid
    });
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda